Question of dropping logs when using SimpleSocketServer and SocketAppender

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
participants (1)
-
Yudong Li