playframework 2.0 - How do I configure Logback to print out the class name - Stack Overflow
%class{0}
will only output the class name, so instead of:
com.something.MyClass
You'll get:
MyClass
This is how my pattern for logback normally looks:
%d{HH:mm:ss} [%thread] %-5p %class{0} - %m%n
You can also add the method and the line if you are interested by doing:
%d{HH:mm:ss} [%thread] %-5p %class{0}.%method:%L - %m%n
Read full article from playframework 2.0 - How do I configure Logback to print out the class name - Stack Overflow
No comments:
Post a Comment