voodoodyne / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
349 stars 139 forks source link

Differentiate between SMTP sessions in log #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If several SMTP sessions are running at the same time 
it is difficult to relate the different statements and 
replies to a single session in the log file.  
The attached patch seems to be the simplest solution 
to this issue. It assigns a unique name to each 
Session thread. By configuring the logging system to 
include the thread name in log entries the problem is 
solved.

Another solution could be to use MDCs of the logging 
system. Neither of these exclude the other.

Original issue reported on code.google.com by hontvari@flyordie.com on 14 Sep 2009 at 9:23

Attachments:

GoogleCodeExporter commented 9 years ago
Rather than tracking a session count, the session thread name now includes the 
remote host/port.  Should be 
more useful and doesn't require tracking more data.

Original comment by lhori...@gmail.com on 14 Sep 2009 at 9:52