|
Boost Users : |
Subject: [Boost-users] [log] Setting log format with string
From: Dirk Van Haerenborgh (dvhaeren_at_[hidden])
Date: 2018-02-07 11:18:44
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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net