コード例 #1
0
        private void ConfigureTestLogger(ITextFormatter formatter = null)
        {
            _logger = new LoggerConfiguration()
                      .WriteTo.UDPSink(IPAddress.Loopback, 9999, formatter)
                      .CreateLogger();

            _listener = new UDPListener(9999);
            _listener.Start();
        }
コード例 #2
0
        private void ConfigureTestLogger(ITextFormatter formatter = null)
        {
            var port = new Random().Next(50123) + 10235;

            _logger = new LoggerConfiguration()
                      .WriteTo.UDPSink(IPAddress.Loopback, port, formatter)
                      .CreateLogger();

            _listener = new UDPListener(port);
            _listener.Start();
        }