Should be logger always final and static?

final, java, logging, static

Solution

All major java logging packages (`java.util.logging`, `log4j`, etc.) are synchronized and thread safe. The standard pattern of a `private final static` logger per class is fine even if the class is called from multiple threads.

Problem

Class can be accessed from many threads. Must be logger in this case also be final and static? Thanks.

Original source

Related problems