When developing Java applications, it is easy to get used to invoking logging on the provided logger via its log level-specific methods. For example, Log4j‘s Logger provides methods such as ...
It’s a 25-year-old principle of object-oriented (OO) design that you shouldn’t expose an object’s implementation to any other classes in the program. The program is unnecessarily difficult to maintain ...