Bug #2548
Updated by Davide Pesavento almost 10 years ago
The root issue is this: that the two methods are protected by different mutexes. * `setLogLevel` `isEnabled` is called by `LoggerFactory::onConfig` `NFD_LOG`, and `LoggerFactory::setDefaultLevel`, and is protected by `LoggerFactory::m_loggersGuard`. the global `g_logMutex`. * `isEnabled` `setLogLevel` is called by `NFD_LOG`, `LoggerFactory::onConfig` and `LoggerFactory::setDefaultLevel`, and is not protected by any mutex. `LoggerFactory::m_loggersGuard`. A data race can result e.g. during a call to `rib::Nrd::initializeLogging` in the NRD thread, while the NFD thread is doing anything that involves printing a log message via `NFD_LOG_*`. (A related issue is that the logging subsystem is basically initialized twice...)