-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
292 additions
and
134 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "common.h" | ||
|
||
|
||
namespace NKqpRun { | ||
|
||
NKikimrServices::EServiceKikimr GetLogService(const TString& serviceName) { | ||
NKikimrServices::EServiceKikimr service; | ||
if (!NKikimrServices::EServiceKikimr_Parse(serviceName, &service)) { | ||
ythrow yexception() << "Invalid kikimr service name " << serviceName; | ||
} | ||
return service; | ||
} | ||
|
||
void ModifyLogPriorities(std::unordered_map<NKikimrServices::EServiceKikimr, NActors::NLog::EPriority> logPriorities, NKikimrConfig::TLogConfig& logConfig) { | ||
for (auto& entry : *logConfig.MutableEntry()) { | ||
const auto it = logPriorities.find(GetLogService(entry.GetComponent())); | ||
if (it != logPriorities.end()) { | ||
entry.SetLevel(it->second); | ||
logPriorities.erase(it); | ||
} | ||
} | ||
for (const auto& [service, priority] : logPriorities) { | ||
auto* entry = logConfig.AddEntry(); | ||
entry->SetComponent(NKikimrServices::EServiceKikimr_Name(service)); | ||
entry->SetLevel(priority); | ||
} | ||
} | ||
|
||
} // namespace NKqpRun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.