Fix Google log directory again (#9063)

This commit is contained in:
mehrdadn
2020-06-22 14:56:28 -05:00
committed by GitHub
parent 2154f38ae5
commit 275da2e400
+3 -2
View File
@@ -171,14 +171,15 @@ void RayLog::StartRayLog(const std::string &app_name, RayLogLevel severity_thres
app_name_without_path = app_file_name;
}
}
google::SetLogFilenameExtension(app_name_without_path.c_str());
google::SetLogFilenameExtension((app_name_without_path + ".log.").c_str());
}
for (int lvl = 0; lvl < NUM_SEVERITIES; ++lvl) {
if (log_dir_.empty()) {
google::SetStderrLogging(lvl);
google::base::SetLogger(lvl, &stdout_logger_singleton);
} else {
google::SetLogDestination(lvl, dir_ends_with_slash.c_str());
std::string prefix = dir_ends_with_slash + LogSeverityNames[lvl] + '.';
google::SetLogDestination(lvl, prefix.c_str());
}
}
#endif