Commit 984f059f by guanghui.cui

修复日志备份路径错误bug

parent 631ff195
......@@ -37,11 +37,12 @@ void app_stopped(int sig); //SIGINT(Ctrl + C)
void logRolloutHandler(const char* filename, std::size_t size)
{
/// 备份日志
std::string strLogPath = GetProcDir();
strLogPath.append(filename);
//std::string strLogPath = GetProcDir();
//strLogPath.append(filename);
std::stringstream ss;
ss << "mv " << strLogPath.data() << " "<<strLogPath.data()<<"_bk";
ss << "mv " << filename << " "<<filename<<"_bk";
LOG(INFO)<<"备份日志:"<<ss.str().c_str();
system(ss.str().c_str());
}
......
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