You can use per-instance loggers and name you loggers as...
private Logger logger;
JdbcFacade(String instanceNameQualifier) {
this.logger = this.getClass().getName() + istanceNameQualifier;
}
instanceNameQualifier might be "A" or "B" or whether else you want it to be.
Jake
Robert Pepersack wrote:
Hello.
Thanks in advance for your help.
I'm running scheduled jobs, and they create their own instances of my JDBC
class. For example, JobA creates a new JdbcFacadeA, and JobB creates its own
JdbcFacadeB. I would like to log each job in its own log (easy). But, I want
the output from JdbcFacadeA to go to the log for JobA, and I want the output
from JdbcFacadeB to go to JobB's log. I'm using the log4j convention for
naming loggers, which uses the fully qualified class name.
How can I do this?
Thanks,
Robert Pepersack
Senior Lead Developer
Maryland Insurance Administration
410-468-2054
---------------------------------------------------------------------
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]