[log] Setting log format with string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[log] Setting log format with string

Boost - Users mailing list
Hi,

I'm trying to simply set the log format of the sinks using a
string. For example from a config file or just in code.

Take for instance this simple line taken from the basic_example
(https://github.com/boostorg/log/blob/master/example/basic_usage/
main.cpp)

logging::add_console_log(std::clog, keywords::format =
"%TimeStamp%: %Message%");

Whenever I add %Timestamp% to the log format, I keep getting
this error:

terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year>
>'
  what():  Year is out of valid range: 1400..10000


I can easily reproduce this by running these examples (without
modification):
https://github.com/boostorg/log/blob/master/example/basic_usage/
main.cpp
https://github.com/boostorg/log/blob/master/example/
settings_file/main.cpp

Am I doing something wrong?
I have this same behaviour on both boost1.62 and boost1.65. The
former as installed from the debian package manager. The latter
was manually compiled...

-Dirk

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users