Skip to content

Logger prints wrong line numbers #8

@Jukka-A

Description

@Jukka-A

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions