diff options
author | qkrorlqr <qkrorlqr@yandex-team.ru> | 2022-03-11 18:45:19 +0300 |
---|---|---|
committer | qkrorlqr <qkrorlqr@yandex-team.ru> | 2022-03-11 18:45:19 +0300 |
commit | bd5d3bed530e4e968071e27b39bb7d82ec296389 (patch) | |
tree | 1fc43ac2dba9f982a196348e04dd8c01b9b9c746 | |
parent | b8a336d293a65ed95fea0bb2643dd566ce451ee1 (diff) | |
download | ydb-bd5d3bed530e4e968071e27b39bb7d82ec296389.tar.gz |
ignoring unknown stuff in log config; NBS-1670
ref:8d81eaf06fb7a4938fce1f483ec40a21dd67146b
-rw-r--r-- | ydb/core/driver_lib/run/run.cpp | 7 | ||||
-rw-r--r-- | ydb/core/protos/config.proto | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ydb/core/driver_lib/run/run.cpp b/ydb/core/driver_lib/run/run.cpp index 5b9a6a57572..dc98c2b81c1 100644 --- a/ydb/core/driver_lib/run/run.cpp +++ b/ydb/core/driver_lib/run/run.cpp @@ -1012,6 +1012,13 @@ void TKikimrRunner::ApplyLogSettings(const TKikimrRunConfig& runConfig) component = NLog::InvalidComponent; } else { component = LogSettings->FindComponent(componentName); + + if (logConfig.GetIgnoreUnknownComponents() + && component == NLog::InvalidComponent) + { + continue; + } + Y_VERIFY(component != NLog::InvalidComponent, "Invalid component name in log configuration file: \"%s\"", componentName.data()); } diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 643c61a92e7..770b3cb6bf2 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -303,6 +303,7 @@ message TLogConfig { optional bool SysLogToStdErr = 12; // writes logs to stderr as well as in syslog optional TUAClientConfig UAClientConfig = 13; optional uint64 TimeThresholdMs = 14 [default = 1000]; + optional bool IgnoreUnknownComponents = 15; } message TCompileServiceConfig { |