Java: Copy/Paste-Safe Logger Creation
We’ve all copied and pasted a Logger from one class to the other, forgetting to change the class name.
Here, use this smarter LoggerFactory which uses the stack trace to figure out what class you really mean. This is safe from copypasta laziness.
Then, to use this logger: