Browse Source

YQL logger refactoring fix stream names

[]  Fix log stream names
epbugaev 2 years ago
parent
commit
e83e0247eb
1 changed files with 5 additions and 5 deletions
  1. 5 5
      ydb/library/yql/utils/log/log.cpp

+ 5 - 5
ydb/library/yql/utils/log/log.cpp

@@ -124,8 +124,8 @@ NYql::NLog::EComponent ConvertComponent(NYql::NProto::TLoggingConfig::EComponent
 
 
 TString ConvertDestinationType(NYql::NProto::TLoggingConfig::ELogTo c) {
 TString ConvertDestinationType(NYql::NProto::TLoggingConfig::ELogTo c) {
     switch (c) {
     switch (c) {
-    case NYql::NProto::TLoggingConfig::STDOUT: return "stdout";
-    case NYql::NProto::TLoggingConfig::STDERR: return "stderr";
+    case NYql::NProto::TLoggingConfig::STDOUT: return "cout";
+    case NYql::NProto::TLoggingConfig::STDERR: return "cerr";
     case NYql::NProto::TLoggingConfig::CONSOLE: return "console";
     case NYql::NProto::TLoggingConfig::CONSOLE: return "console";
     default : {
     default : {
         ythrow yexception() << "unsupported ELogTo destination in Convert";
         ythrow yexception() << "unsupported ELogTo destination in Convert";
@@ -137,9 +137,9 @@ TString ConvertDestinationType(NYql::NProto::TLoggingConfig::ELogTo c) {
 
 
 NYql::NProto::TLoggingConfig::TLogDestination CreateLogDestination(const TString& c) {
 NYql::NProto::TLoggingConfig::TLogDestination CreateLogDestination(const TString& c) {
     NYql::NProto::TLoggingConfig::TLogDestination destination;
     NYql::NProto::TLoggingConfig::TLogDestination destination;
-    if (c == "stdout") {
+    if (c == "cout") {
         destination.SetType(NYql::NProto::TLoggingConfig::STDOUT);
         destination.SetType(NYql::NProto::TLoggingConfig::STDOUT);
-    } else if (c == "stderr") {
+    } else if (c == "cerr") {
         destination.SetType(NYql::NProto::TLoggingConfig::STDERR);
         destination.SetType(NYql::NProto::TLoggingConfig::STDERR);
     } else if (c == "console") {
     } else if (c == "console") {
         destination.SetType(NYql::NProto::TLoggingConfig::CONSOLE);
         destination.SetType(NYql::NProto::TLoggingConfig::CONSOLE);
@@ -277,7 +277,7 @@ void InitLogger(const NProto::TLoggingConfig& config, bool startAsDaemon) {
 
 
         // Set stderr log destination if none was described in config
         // Set stderr log destination if none was described in config
         if (config.LogDestSize() == 0) {
         if (config.LogDestSize() == 0) {
-            backends.emplace_back(CreateLogBackend("stderr", LOG_MAX_PRIORITY, false));
+            backends.emplace_back(CreateLogBackend("cerr", LOG_MAX_PRIORITY, false));
         }
         }
 
 
         for (const auto& logDestionation : config.GetLogDest()) {
         for (const auto& logDestionation : config.GetLogDest()) {