-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Avoid calling sbt deprecated methods, stop using log4j #2087
Conversation
This stops using log4j sbt logger in favor of the global logger, which should not log warnings around SecurityManager
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.
This really feels a bit hacky. I opened an issue in the past, but instead of removing the private[sbt]
scope, they instead removed the @deprecation
of the used methods.
Here is the issue in sbt:
Also, from looking in the current implementation, the use of Log4j isn't completely disabled, it's only avoided. I think, there are even deeper issues in sbt and the way they use Log4j, as it seems to me, they somehow post-process log messages without sanitizing them.
Beside that, we are probably better to use the newer (hidden) API to create a logger anyways. It just doesn't feel ideal. We should ask sbt devs again, whether they can make this specific API public.
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.
Looks as good as it can, I guess.
Huh, what's going on here? I pushed a commit to your branch, but this PR isn't updated. Hmm. |
@lefou I can try to close the PR and open a new one. |
@lolgab I did it in-place. It helped. |
Thank you! |
This stops using log4j sbt logger in favor of the global logger, which should not log warnings around SecurityManager.
This is the log I'm talking about:
The method we were calling was converting our appender into a log4j
XAppender
and then wrapping it in aConsoleAppender
.Since we already create a
ConsoleAppender
we can avoid all these conversions and bypass log4j altogether.