How can I use BOOST_LOG_TRIVIAL macro to log anything to both stdout / stderr and file?
If I do
boost::log::add_file_log
(
boost::log::keywords::file_name =
"logs/%Y-%m-%d_%H-%M-%S.%N.log",
boost::log::keywords::rotation_size = 10 * 1024 * 1024,
boost::log::keywords::time_based_rotation =
boost::log::sinks::file::rotation_at_time_point(0, 0, 0),
boost::log::keywords::format = "[%TimeStamp%]: %Message%"
);
boost::log::add_common_attributes();
It won't log anything to stdout / stderr, only file.