Apr 15th, 2008, 08:06 AM
Separation of Quartz Job Logging
I'm using Spring IOC to manage my Quartz jobs, and I'm using log4j for logging. Spring creates my job instances, and my log4j Loggers are created as instance variables in my job classes, DAOs, etc.
I'm trying to separate the logging for each Quartz job. I created a custom log4j RepositorySelector so that the common classes in my library can log to different files.
I'm using MethodInvokingJobDetailFactoryBean to create and run my POJO jobs.
I need to put a value in the log4j MDC (Mapped Diagnostic Context) before my jobs are created and run.
How can I do this?