Skip to content
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

Logger prints wrong line numbers #8

Open
Jukka-A opened this issue May 29, 2019 · 0 comments
Open

Logger prints wrong line numbers #8

Jukka-A opened this issue May 29, 2019 · 0 comments

Comments

@Jukka-A
Copy link

Jukka-A commented May 29, 2019

I noticed that when printing System.out or System.err the line numbers are incorrect in the final log message. The incorrect line numbers comes from LogLevel class where the message is given to logger.

In SLF4JPrintStreamDelegate ClassOrigin.getCallOrigin could also easily resolve the correct line number. SLF4J logger cannot take in line number, but we could put it in front of message for example. It could be customizable feature how to add line number to message or format message. This requires new interface to sysout-over-slf4j which user could implement.

Even some indication in the log message about the wrong line number would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant