I have a scenario wherein I invoke a third party REST URL from inside a FOR loop for different values of the field JOBNAME. I wish to log the logging statements for each JOBNAME inside a separate log file i.e. the request sent to the REST URL, all the intermediate business logic logging and the response received would need to be part of different log file for each JOBNAME.
The catch here is that the processing involves no threads. Is the MDC approach for log4j
feasible for non-threaded scenario's as well. If not, how can I achieve this?