Closed ThisALV closed 2 months ago
Look good to me. cc @dragonflylee @XITRIX
Good, not sure why we even need not thread safe logging, btw
Is there any reason to make it "false" by default, or not use mutex without any checks?
Good, not sure why we even need not thread safe logging, btw
Is there any reason to make it "false" by default, or not use mutex without any checks?
I thought most application are single threaded or didn't log from async task thread so it would avoid the overhead of locking the mutex in those cases, but that overhead might be kinda small so I'm not really sure.
I let you decide what default value we should use for that property
I enabled thread safe logging by default. Could the PR be merge ?
Looks good to me
This PR adds
Logger::setThreadSafeLogging(bool)
and iftrue
is passed the logging methods will lock a mutex before printing tologOutput
and firinglogEvent