我的日志记录是根据以下代码格式化的:
keywords::format =
(
expr::stream
<< expr::format_date_time< boost::posix_time::ptime >("TimeStamp", "%Y-%m-%d %H:%M:%S")
<< ": <" << logging::trivial::severity
<< "> " << expr::smessage
)
我在输出中收到了消息:
2014-11-20 14:41:44: <info> An informational severity message
2014-11-20 14:41:44: <warning> A warning severity message
2014-11-20 14:41:44: <error> An error severity message
我需要以固定长度的日志类型显示这些消息,如:
2014-11-20 14:41:44: <info> An informational severity message
2014-11-20 14:41:44: <warning> A warning severity message
2014-11-20 14:41:44: <error> An error severity message
如何获得此结果?