I want to modify slf4j with Logback in an outdated application. Well, the legacy application has its own logging structure. So all I had to do was change the logging structure for logging into slf4j instead of log4j.
He worked like a dream. I was pleased until I noticed that the journal was logged for each journal event:
Logger.java:...
Hop! This would not help my fellow developers when trying to figure out where the magazine event came from.
How can I say that Logback looks like several levels on the stack for the actual location to register?
The logger class is a utility class with the following methods:
public static void debug(String clazz, String message) { org.slf4j.Logger logger = LoggerFactory.getLogger(clazz); logger.debug(message); }
java slf4j legacy logback
Stijn van bael
source share