Tag Info

New answers tagged


I am not aware of any situation where a local logger makes sense over a static final logger using any of the built-in or industry-standard logging frameworks in Java. Loggers are thread-safe, so threads can share loggers. Having "my own" logger does not have any benefit here. Loggers are typically defined for one of the following categories: For a ...


I would heavily recommend against this design. You are creating a cyclic dependency between your project's individual classes A, B, C, ... and your Logger class, which makes your Logger unusable in other projects or in components of your project which shall not depend on A, B and C. Moreover, whenever you are going to add a new class which needs logging, you ...

Top 50 recent answers are included