@@ -2381,7 +2381,7 @@ static Singleton<bool> firstUpdateConfigHookCall;
2381
2381
static bool firstUpdateConfigHookCallValue{true };
2382
2382
bool queryFirstUpdateConfigHookCall ()
2383
2383
{
2384
- return *firstUpdateConfigHookCall.query ([] () { return &firstUpdateConfigHookCallValue; });;
2384
+ return *firstUpdateConfigHookCall.query ([] () { return &firstUpdateConfigHookCallValue; });
2385
2385
}
2386
2386
2387
2387
auto updateConfigFunc = [](const IPropertyTree *oldComponentConfiguration, const IPropertyTree *oldGlobalConfiguration)
@@ -2390,15 +2390,17 @@ auto updateConfigFunc = [](const IPropertyTree *oldComponentConfiguration, const
2390
2390
};
2391
2391
static CConfigUpdateHook configUpdateHook;
2392
2392
// NOTE: The parameter updateConfigOnTheFly value of true signifies that the thread
2393
- // safe caller has completed setting up the logging configuration and that
2394
- // any further configuration changes are from non-thread safe callers.
2395
- void setupContainerizedLogMsgHandler (bool updateConfigOnTheFly)
2396
- {
2397
- // NOTE: We need to allow the first config update hook call to update the config
2398
- // as if it was not called from the config update hook.
2399
- // This is to allow the configuration to be setup by the thread safe caller.
2400
- // In practice this means allowing 2 calls to setupContainerizedLogMsgHandler
2401
- // before the update config hook is allowed to prevent on the fly format changes.
2393
+ // safe caller has completed setting up the logging configuration (normally
2394
+ // from a main call).
2395
+ // Any further configuration changes are from non-thread safe callers.
2396
+ // EXCEPT: There are 2 calls to setupContainerizedLogMsgHandler that are
2397
+ // thread-safe. In order to allow them to change the log format (if required)
2398
+ // etc we need to allow the first config update hook call to update the config
2399
+ // as if it was not called from the config update hook.
2400
+ void setupContainerizedLogMsgHandler (bool updateConfigOnTheFly)
2401
+ {
2402
+ // Alow the first config update hook call to update the config as if it was not
2403
+ // called from the config update hook to allow log configuration changes.
2402
2404
if (updateConfigOnTheFly && queryFirstUpdateConfigHookCall ())
2403
2405
{
2404
2406
firstUpdateConfigHookCallValue = false ;
0 commit comments