// // DynamicAppender - shows how to add/remove appenders dynamically. // #include #include #include #include #include int main() { static plog::DynamicAppender dynamicAppender; plog::init(plog::verbose, &dynamicAppender); PLOGW << "This message goes nowhere as no real appenders exist"; { plog::ColorConsoleAppender consoleAppender; dynamicAppender.addAppender(&consoleAppender); PLOGI << "Message from a dynamically added appender"; dynamicAppender.removeAppender(&consoleAppender); } PLOGW << "This message goes nowhere as no real appenders exist"; return 0; }