Could you point me to a resource where I could get more information on how to do this. I don't have much experience with extending Log4J's classes.
Thank you. On Tue, 22 Mar 2005 21:28:36 +0100, David J. M. Karlsen <[EMAIL PROTECTED]> wrote: > Elihu Smails wrote: > > >Is there a way to use one of the layouts/patterns in order to get the > >username into the logs? I do not see this as an option in any of the > >configurations and it seems like it would be really easy. > > > >Thank you. > > > > > If it's the username of the user executing the java-process: use the > system-property java.user (or java.username - can't quite remember right > now). If it's a username in your application - use NDC (or MDC) and get > it with %x in PatternLayout - or both in a combination! :-) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
