Log4j Logger and concurrency

concurrency, java, log4j, singleton

Solution

Nope, there'll be no problems because it's thread-safe (i.e. it won't break if multiple threads are accessing it at the same time).

See http://logging.apache.org/log4j/1.2/faq.html#a1.7

Problem

Is it okay to have a org.apache.log4j.Logger field in a singleton class? Could be any concurrency issues because of sharing it among multiple threads?

Original source