I am using a discriminator for logging in different file. Based on the thread name. It usually give good result, except for the quartz job that are all logger in file with name like :
org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1.log
I would like to have a file that is the name of the quartz job (on something base on it) to be able to quickly find which file contains the logs for a job. Is there a way ask quartz if the current thread is associated with a job?
Thanks
Finally, I resolve it by manually indicating with slf4j MDC
at the beginning of the task, I do
and at the end
So I just need to check the key in MDC to know if I am inside a task.