We would like to use log4j to create separate log files for each particular
function of our application. The problem is that we have common utils type
packages that get used by different parts of the application.

We would like these common type packages / classes to write their logging
info to different log files - depending upon which 'subsystem' is calling them.

I can think of two ways in which we can do this, but I'm not really happy with
them. They are:

1. Just write the common/utils packages to all log files
2. Pass around some sort of a key which says which log file / Category to write to.

Both of these options sound kind of messy.

Another idea is to use NDCs - but all this will do is assist us in locating various
log output in separate log files.

Ideally, it would be nice if we could set the name of the current thread, and this
would magically allow us to route the logging output to a particular log file.

Does anyone have any ideas / suggestions that could assist us?

Thanks

Nigel Ramsay
Deutsche Bank
London


--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to