Signed-off-by: JinHai-CN <hai.jin@zilliz.com>
This commit is contained in:
JinHai-CN 2020-04-23 10:45:34 +08:00
parent 92508bcc0a
commit 23ad133c14

View File

@ -54,31 +54,31 @@ RolloutHandler(const char* filename, std::size_t size, el::Level level) {
int ret;
std::string m(std::string(dir) + "/" + s);
s = m;
switch(level){
case el::Level::Debug:
s.append("." + std::to_string(++debug_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Warning:
s.append("." + std::to_string(++warning_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Trace:
s.append("." + std::to_string(++trace_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Error:
s.append("." + std::to_string(++error_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Fatal:
s.append("." + std::to_string(++fatal_idx));
ret = rename(m.c_str(), s.c_str());
break;
default:
s.append("." + std::to_string(++global_idx));
ret = rename(m.c_str(), s.c_str());
break;
switch (level) {
case el::Level::Debug:
s.append("." + std::to_string(++debug_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Warning:
s.append("." + std::to_string(++warning_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Trace:
s.append("." + std::to_string(++trace_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Error:
s.append("." + std::to_string(++error_idx));
ret = rename(m.c_str(), s.c_str());
break;
case el::Level::Fatal:
s.append("." + std::to_string(++fatal_idx));
ret = rename(m.c_str(), s.c_str());
break;
default:
s.append("." + std::to_string(++global_idx));
ret = rename(m.c_str(), s.c_str());
break;
}
}