// // SetFileName - shows how to change a log file name at arbitrary moment. // #include #include #include #include int main() { static plog::RollingFileAppender fileAppender("SetFileNameAAA.log"); plog::init(plog::debug, &fileAppender); for (int i = 0; i < 100; ++i) { PLOG_INFO << "i: " << i; } fileAppender.setFileName("SetFileNameBBB.log"); for (int i = 0; i < 100; ++i) { PLOG_INFO << "i: " << i; } return 0; }