Loading src/sled/log/log.cc +7 −3 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ GetCurrentUTCTime() } static LogLevel g_log_level = LogLevel::kTrace; static std::string g_log_file_name; // static std::string g_log_file_name; static std::ofstream g_log_stream; void Loading @@ -110,8 +110,12 @@ SetLogLevel(LogLevel level) void SetLogFileName(const char *file_name) { g_log_file_name = file_name; std::ofstream tmp_stream(file_name, std::ios_base::app); if (tmp_stream.is_open()) { g_log_stream.open(file_name, std::ios_base::app); } else { LOGE("log", "can't open new log file [{}]", file_name); } } static std::atomic<uint32_t> g_current_id(0); Loading Loading
src/sled/log/log.cc +7 −3 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ GetCurrentUTCTime() } static LogLevel g_log_level = LogLevel::kTrace; static std::string g_log_file_name; // static std::string g_log_file_name; static std::ofstream g_log_stream; void Loading @@ -110,8 +110,12 @@ SetLogLevel(LogLevel level) void SetLogFileName(const char *file_name) { g_log_file_name = file_name; std::ofstream tmp_stream(file_name, std::ios_base::app); if (tmp_stream.is_open()) { g_log_stream.open(file_name, std::ios_base::app); } else { LOGE("log", "can't open new log file [{}]", file_name); } } static std::atomic<uint32_t> g_current_id(0); Loading