From cf697b5e9c4708cf33de6dd3aad1621cfb4ee187 Mon Sep 17 00:00:00 2001 From: Anton Pryakhin Date: Tue, 15 Oct 2024 16:19:29 +0300 Subject: [PATCH] Feat[MWC]: retrieve bslsLogSeverityThreshold from config Signed-off-by: Anton Pryakhin --- src/groups/mwc/mwctsk/mwctsk_logcontroller.h | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/groups/mwc/mwctsk/mwctsk_logcontroller.h b/src/groups/mwc/mwctsk/mwctsk_logcontroller.h index a966ea638..a579b8310 100644 --- a/src/groups/mwc/mwctsk/mwctsk_logcontroller.h +++ b/src/groups/mwc/mwctsk/mwctsk_logcontroller.h @@ -525,20 +525,13 @@ int LogControllerConfig::fromObj(bsl::ostream& errorDescription, } ball::Severity::Level bslsSeverityAsBal = ball::Severity::e_ERROR; - // TODO: enforcing 'obj' to have 'bslsLogSeverityThreshold' accessor is a - // backward incompatible change from build perspective, and will require a - // bulk promotion of dependents, which can be tackled later. For now, we - // just assume a log severity level of 'ERROR'. - // if (ball::SeverityUtil::fromAsciiCaseless( - // &bslsSeverityAsBal, - // obj.bslsLogSeverityThreshold().c_str()) != - // 0) { - // errorDescription << "Invalid value for 'bslsLogSeverityThreshold' - // ('" - // << obj.bslsLogSeverityThreshold() << "')"; - // return -1; // - // RETURN - // } + if (ball::SeverityUtil::fromAsciiCaseless( + &bslsSeverityAsBal, + obj.bslsLogSeverityThreshold().c_str()) != 0) { + errorDescription << "Invalid value for 'bslsLogSeverityThreshold'('" + << obj.bslsLogSeverityThreshold() << "')"; + return -1; // RETURN + } d_bslsLogSeverityThreshold = LogControllerConfig::balToBslsLogLevel( bslsSeverityAsBal);