Boost logo

Boost Users :

Subject: [Boost-users] Reusing expressions::stream
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2015-08-11 10:23:53


with boost log I have:
using namespace boost::log;

  keywords::format =
    << expressions::format_date_time<boost::posix_time::ptime>("TimeStamp",
    << " [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?



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at