-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Wrong class name printed when using LoggingEventBuilder with payload #416
Comments
Thank you for reporting an issue. See the wiki for documentation and slack for questions. |
The difference seems to be inside Log statements without payload are logged using: Log statements with payload are logged using: The first thing Therefore I think the bug is inside slf4j not in kotlin-logging. Maybe leave the issue open until the bug is resolved there ... |
Are you using log4j? There was a related bug there. |
No Im using slf4j-jdk the java util logging. |
Log4j slf4j issue is here for reference: apache/logging-log4j2#1533 |
It might be a similar fix. |
Seems like this should be fixed in slf4j 2.0.13. I will try to upgrade. |
should be in version 6.0.9. |
When using slf4j version 2.0.13 the correct class name is logged. |
Thanks! |
The wrong class name is printed when using the LoggingEventBuilder with a payload.
The following example demonstrates the issue:
Which will print:
The first log statement will be logged with
io.github.oshai.kotlinlogging.slf4j.internal.LocationAwareKLogger
as a classname.Which is wrong. It supposed to be
my.pkg.MyClassKt
.In the second log statement however it seems to work fine.
Check out the example to reproduce the issue: example.zip
The text was updated successfully, but these errors were encountered: