-
Notifications
You must be signed in to change notification settings - Fork 202
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
Remove log4j #328
Remove log4j #328
Conversation
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 feels so good.
Really happy that this is possible. I thought it wasn't. Let's battle test it a little bit more locally and we merge!
.build() | ||
|
||
appender | ||
private def printTrace(line: String): Unit = { |
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.
Shall we add a method for Throwable
here?
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.
Oh no, just realized that the method targeting Throwable
comes inherited.
outAppender.start() | ||
errAppender.start() | ||
private def print(msg: String, fn: String => Unit): Unit = { | ||
if (msg == null) () |
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 implementation is pretty weird. why .lines
and why the NPE guard? Is there a way we can remove that from this core logging API endpoint?
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.
.lines
is to have the prefix on every line (think log.error("foo\nbar")
). The NPE guard is to make sure .lines
won't crash. There are cases where exception.getMessage
is null
.
assertTrue("`logger2` received messages of `logger1`", | ||
!msgs2.exists(_.startsWith("Compiling"))) | ||
assertTrue("`logger2` received verbose messages of `logger1`", | ||
!msgs2.exists(_.startsWith(debugPrefix))) |
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.
🎉
No description provided.