Commit bdac79cb by guanghui.cui

修复日志备份时候崩溃的问题

parent 5985d6e1
...@@ -26,10 +26,9 @@ void logRolloutHandler(const char* filename, std::size_t size) ...@@ -26,10 +26,9 @@ void logRolloutHandler(const char* filename, std::size_t size)
/// 备份日志 /// 备份日志
//std::string strLogPath = GetProcDir(); //std::string strLogPath = GetProcDir();
//strLogPath.append(filename); //strLogPath.append(filename);
std::cout<<"bk filename:"<<filename<<std::endl;
std::stringstream ss; std::stringstream ss;
ss << "mv " << filename << " "<<filename<<"_bk"; ss << "mv " << filename << " "<<filename<<"_bk";
LOG(INFO)<<"备份日志:"<<ss.str().c_str();
system(ss.str().c_str()); system(ss.str().c_str());
} }
...@@ -279,7 +278,8 @@ int main() ...@@ -279,7 +278,8 @@ int main()
LOG(INFO) << "recv ODS pushDate failed or timeout"; LOG(INFO) << "recv ODS pushDate failed or timeout";
} }
} }
/// 注销回调函数
el::Helpers::uninstallPreRollOutCallback();
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment