Acquire a thread lock for serializing access to the underlying I/O.
logging/NullHandler.createLock
NullHandler.createLock