File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void TCommandDatabaseDump::Parse(TConfig& config) {
54
54
}
55
55
56
56
int TCommandDatabaseDump::Run (TConfig& config) {
57
- auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriority (config.VerbosityLevel )));
57
+ auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriorityChatty (config.VerbosityLevel )));
58
58
log->SetFormatter (GetPrefixLogFormatter (" " ));
59
59
60
60
NDump::TClient client (CreateDriver (config), std::move (log));
@@ -87,7 +87,7 @@ void TCommandDatabaseRestore::Parse(TConfig& config) {
87
87
}
88
88
89
89
int TCommandDatabaseRestore::Run (TConfig& config) {
90
- auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriority (config.VerbosityLevel )));
90
+ auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriorityChatty (config.VerbosityLevel )));
91
91
log->SetFormatter (GetPrefixLogFormatter (" " ));
92
92
93
93
auto settings = NDump::TRestoreDatabaseSettings ()
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ void TCommandClusterDump::Parse(TConfig& config) {
66
66
}
67
67
68
68
int TCommandClusterDump::Run (TConfig& config) {
69
- auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriority (config.VerbosityLevel )));
69
+ auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriorityChatty (config.VerbosityLevel )));
70
70
log->SetFormatter (GetPrefixLogFormatter (" " ));
71
71
72
72
NDump::TClient client (CreateDriver (config), std::move (log));
@@ -99,7 +99,7 @@ void TCommandClusterRestore::Parse(TConfig& config) {
99
99
}
100
100
101
101
int TCommandClusterRestore::Run (TConfig& config) {
102
- auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriority (config.VerbosityLevel )));
102
+ auto log = std::make_shared<TLog>(CreateLogBackend (" cerr" , TConfig::VerbosityLevelToELogPriorityChatty (config.VerbosityLevel )));
103
103
log->SetFormatter (GetPrefixLogFormatter (" " ));
104
104
105
105
auto settings = NDump::TRestoreClusterSettings ()
Original file line number Diff line number Diff line change @@ -47,6 +47,18 @@ ELogPriority TClientCommand::TConfig::VerbosityLevelToELogPriority(TClientComman
47
47
}
48
48
}
49
49
50
+ ELogPriority TClientCommand::TConfig::VerbosityLevelToELogPriorityChatty (TClientCommand::TConfig::EVerbosityLevel lvl) {
51
+ switch (lvl) {
52
+ case TClientCommand::TConfig::EVerbosityLevel::NONE:
53
+ return ELogPriority::TLOG_INFO;
54
+ case TClientCommand::TConfig::EVerbosityLevel::DEBUG:
55
+ case TClientCommand::TConfig::EVerbosityLevel::INFO:
56
+ case TClientCommand::TConfig::EVerbosityLevel::WARN:
57
+ return ELogPriority::TLOG_DEBUG;
58
+ }
59
+ return ELogPriority::TLOG_INFO;
60
+ }
61
+
50
62
size_t TClientCommand::TConfig::ParseHelpCommandVerbosilty (int argc, char ** argv) {
51
63
size_t cnt = 0 ;
52
64
for (int i = 0 ; i < argc; ++i) {
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ class TClientCommand {
91
91
};
92
92
93
93
static ELogPriority VerbosityLevelToELogPriority (EVerbosityLevel lvl);
94
+ static ELogPriority VerbosityLevelToELogPriorityChatty (EVerbosityLevel lvl);
94
95
95
96
int ArgC;
96
97
char ** ArgV;
You can’t perform that action at this time.
0 commit comments