Exemple #1
0
        void setupSOSMaxAppender()
        {
            var defaultFormatter = new DefaultLogMessageFormatter();
            var socket = new SOSMaxAppender();
            LoggerFactory.AddAppender(((logger, logLevel, message) => {
                message = defaultFormatter.FormatMessage(logger, logLevel, message);
                socket.Send(logLevel, message);
            }));

            socket.Connect(IPAddress.Loopback, 4444);
        }
Exemple #2
0
        static void clientSocketTest()
        {
            var defaultFormatter = new DefaultLogMessageFormatter();
            var socket = new SOSMaxAppender();
            LoggerFactory.AddAppender(((logger, logLevel, message) => {
                message = defaultFormatter.FormatMessage(logger, logLevel, message);
                socket.Send(logLevel, message);
            }));

            socket.Connect(IPAddress.Loopback, 4444);

            Thread.Sleep(50);
        }