The Java util logging uses the following output line format:
java.util.logging.SimpleFormatter.format = %4$s %2$s %n
This gives the following output, where first main is a package name, while the last main is a method name:
INFO main.MySuperPuperClassName main
How to eliminate of the package name here? So that the resulting log line would look like this:
INFO MySuperPuperClassName main
The idea is to not output the package name in the log line.
I’m pretty sure you cannot do this with logging properties alone. However, you can write your own Formatter class:
To use it, you can refer to it in logging properties:
Or, you can set it programmatically: