trancos30 / subethasmtp

Automatically exported from code.google.com/p/subethasmtp
Other
1 stars 0 forks source link

multiple SMTPServer instances and logging #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If more then one SMTPServer instances are running in the same process, 
then it is impossible to differentiate between them. 
The attached patch contains the following changes:
-servers are identified by a string consisting of an interface address and 
a port 
-starting and stopping log messages are complemented with the above server 
name. Actually in case of the started and stopped message this is 
redundant (see MDC later), but it was symmetric this way.
-the missing "started" log message is added
-an SLF4J MDC variable is set to the above server name. This is valid not 
only in the server threads but in child (client connection) threads too. 
The variable should be included in the log layout.

(I run into an unrelated obsolete comment in Session.java, and updated it 
too)

Original issue reported on code.google.com by hontvari@flyordie.com on 17 Oct 2009 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
Patch applied, thanks!

Original comment by lhori...@gmail.com on 24 Oct 2009 at 7:19