SimpleSocketServer - Not so simple problem
1 posts in topic
Flat View  Flat View

Posted By:   Nicholas_Whitehead
Posted On:   Wednesday, November 13, 2002 05:06 AM

I have about 10 Java applications running all over this network and in lieu of organizing a common network directory to log to, I am using a SocketAppender. My problem is that we used to log to a local drive and used an arbitrary system property (that we set) called app.user.name and we used this to create a log file called .log.

Now we want seperate files to be generated by the SimpleSocketServer, and obviously it does not know what the user name of the submitting user is, so I cannot figure out how to generate a seperate file for each user.

Any ideas ?


Re: SimpleSocketServer - Not so simple problem

Posted By:   Mark_Womack  
Posted On:   Thursday, November 14, 2002 09:09 AM

You could look at using the log4j MDC class to attach the user name in the logging event. You would set the MDC on the caller side. Then you could modify your appender on the SimpleSocketServer side to look at the MDC value and log to the appropriate file.

About | Sitemap | Contact