-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Log4j2 #18
Conversation
Logger.log4j.setLevel(org.apache.log4j.Level.toLevel(level)); | ||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false); | ||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggerConfig(Logger.juli.getName()); | ||
loggerConfig.setLevel(org.apache.logging.log4j.Level.OFF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it not set level instead of always using Level#OFF?
Looks good, left one comment |
PropertyConfigurator.configure(shutUp); | ||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false); | ||
LoggerConfig loggerConfig = ctx.getConfiguration().getRootLogger(); | ||
loggerConfig.setLevel(org.apache.logging.log4j.Level.OFF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this line do?
Sets the default and lets the configuration define the each particular level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not logging configuration is defined. It turns it off entirely.
looks good to me too (haven't tested it though) |
No description provided.