thean acceptable way it to use the singleton logger which delegates the actual logging to it'sits own thread
you can then use any efficient producer-consumerproducer-consumer solution (like a non-blocking linked list based on the atomic CaS) to gather the log messages without worrying that it is an implicit global lock
the log call will then first filter and build the log message and then pass it to the consumer, the consumer will then grab it and write it out (and free the resources of the individual message)