|
Boost Users : |
Subject: [Boost-users] Reusing expressions::stream
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2015-08-11 10:23:53
Hello,
with boost log I have:
using namespace boost::log;
add_file_log
(
"sample.log",
keywords::format =
(
expressions::stream
<< expressions::format_date_time<boost::posix_time::ptime>("TimeStamp",
"%H:%M:%S")
<< " [Rank: "<< expressions::attr<int>("Rank") << "]"
<< ": " << expressions::message
)
);
which works fine.
Now that may be a maximum stupid questions. But when I want to reuse the
format expressions for other uses, e.g. another sink, how can I do that?
i.e. how to declare and use a variable that holds that expressions?
:-/
Thanks,
Florian
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