Error Messages in logs are the starting point of a search for clues. But if you’re running in a distributed Microservice environment, correlation of logs entries and tracing between services becomes important.
Logging frameworks can add context information that will be logged together with the message. If you need more functionality Zipkin can help you: It will provide correlation IDs to correlate log entries between systems. You can add this information to your existing logs or forward it to a central Zipkin server. The traces can be augmented with tags so you can search them online.
This presentation gives an introduction about the possibilities of Log4j and shows the additional possibilities of Zipkin and Spring Sleuth.