How do I get my logging framework (currently Logback) to play nicely with Eclipse? In particular, it would be nice to click on a log statement and be taken to the line where it was produced.
I'm aware of the Logback Eclipse Plugin however apparently it is outdated, and only works with an old version of Logback.
Is there some other logging framework that works better with Eclipse? I assume there must be a nice way to do this.
I use this pattern:
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level (%file:%line\) - %message%n</pattern>
</encoder>
</appender>
The (%file:%line) part is by default clickable in the Eclipse console.
If you add %caller
to the pattern, then the functionality of the Console of Eclipse can handle your problem...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With