mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
Fix Google log directory again (#9063)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user