-
Notifications
You must be signed in to change notification settings - Fork 81
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
slf4j LogAppender #479
slf4j LogAppender #479
Conversation
4cbb1c1
to
9adb608
Compare
@justcoon I guess this is also the reason, why updating to 2.0.1 broke our slf4j + logstash json logging? And to answer your last question: Yes we definitely need the ability to set logger names. In the 2xRC version we did this with the |
hello @987Nabil, in relation to
do you mean update from 2.0.0 -> 2.0.1? If yes, maybe it will be good if you open some ticket with details (like logstash configuration, zio logging slf4j setup - log format ..., code snippet, if possible) in case of logger name - in my opinion, this is reasonable default logger name resolution, based on trace |
* Appends a key/value pair, with the value it created with the log appender. | ||
*/ | ||
final def appendKeyValue(key: String, appendValue: LogAppender => Unit): Unit = { | ||
def appendKeyValue(key: String, value: 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.
Let's not modify the appendKeyValue
. Instead, generate an anonymous LogAppender
that will simply produce string for any possible combination of operations.
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.
@jdegoes: previously removed function def appendKeyValue(key: String, appendValue: LogAppender => Unit) of LogAppender- returned back
I'll do.
Maybe it is a reasonable default, but in my opinion having it configurable is a must. There are architecture guidelines out there in the wild, that require special logger names for access logging for example. One reason for something like this can be, that messages with a certain name get treated in your logging tool based on logger names. |
b54a645
to
a5a8dfa
Compare
latest changes
|
slf4j log appender
LogAppender.appendKeyValue
- logged into MDCLogAppender.appendCause
- as throwable,Cause
transformed intoFiberFailure
Trace
open question -
rootLogLevel
inprivate def slf4jLogger(rootLoggerName: Trace => String, rootLogLevel: LogLevel, format: LogFormat): ZLogger[String, Unit]
? - in general, log level setup is in specific logger configurationLogFormat
combinators/composition - in current design, it is not clear, where specific LogFormat part will be "inserted" (message, MDC, cause ...), there is a question, if it should not be more clear in LogFormat itselfrelated to: #485, #453, #445