[logback-user] Question of dropping logs when using SimpleSocketServer and SocketAppender

Yudong Li yudong.li at metacdn.com
Thu Sep 12 10:09:17 CEST 2013


Hi,

I've got some issues while using Socket to send logs to a central
repository. When the logs generated from client side is slow, everything
works fine. However, if the logs from client side is very fast, it looks
like logs entries will be dropped significantly during transmit.

I did an experiment to confirm it:
        int i = 0 ;
        while (i < 10000) {
            log.info(i + " : =======");
            i ++;
        }

And on the sever side, the received log looks like:
2013-09-12 17:59:09,174 INFO  [main]  - 0 : =======
2013-09-12 17:59:09,175 INFO  [main]  - 5 : =======
2013-09-12 17:59:09,175 INFO  [main]  - 10 : =======
2013-09-12 17:59:09,176 INFO  [main]  - 13 : =======
2013-09-12 17:59:09,177 INFO  [main]  - 17 : =======
2013-09-12 17:59:09,178 INFO  [main]  - 21 : =======

Is there any way to avoid this from happening? What I have read from doc is
logback is based on TCP so eventual consistency should be able to achieved,
or may be my understanding is not correct?

Thanks if anyone can give me some hint.

Regards,
Yudong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130912/bcb41e26/attachment.html>


More information about the Logback-user mailing list