For debugging purposes it can be easy to have along your logs the class name and the line number where the logging happened. You can easily turn that on with the -DlogShowClassAndLineNumber=true or by calling the static method Log.setShowClassAndLineNumber(true). Then when you log you will see something like:
Warn.log("Hello there!");
11:33:51.990-WARN-com.mypackage.MyClass:22 Hello there!
NOTE: This feature impacts speed and allocates memory so you should only use it for development and debugging, not in production.
You want to debug a class but when you turn on the Debug level you see too many lines scrolling down your console. You can filter that noise out by setting up a filter.
Let's say you only want to see logging that happens inside a certain class. You can do:
Log.setFilter("com.mypackage.MyClass");
You can also pass multiple classes:
Log.setFilter("com.mypackage.MyClass, com.mypackage.MyOtherClass");
And you can use wildcards: (only applicable in the end of the name)
Log.setFilter("com.mypackage.*"); // include everything from that package
You can also pass a filter through the -DlogFilter command-line option.
NOTE: This feature impacts speed and allocates memory so you should only use it for development and debugging, not in production.