Open psramkumar opened 8 years ago
Sorry, but I have no idea what you are proposing here. Can you give us some links to documentation and provide an example of a piece of code that displays the desired behavior?
as we know now a days Trend is moving towards Micro service Architecture.
Troubleshooting with log file is too complex, especially in multi threaded environment. in Different Services, it is better to have logger to identify a transaction from end to end, with some custom Context Information.
i found slf4j MDC serves better but it will not support Multi treaded environment.
below is the sample scenario where logger is required in more intelligent fashion. http://www.blackpepper.co.uk/correlating-log-entries-using-log4j-and-the-mapped-diagnostic-context/
hope you understand the Use Case.
So this is an issue for Log4j, isn't it? And there is no easy solution. The framework used to create the threads need to support context propagation. HTH
it is better to have extended Support for Logging
LOGGING CONTEXTUAL INFO IN AN ASYNCHRONOUS APPLICATION
Switching Contextual Info in Multithreaded Calls. and Clean up. SLF4J support with MDC (Mapped Diagnostic Context) but it is not good for Multithreaded environment.