Boost logo

Boost Users :

Subject: [Boost-users] [log] ThreadID attribute is empty
From: Igor R (boost.lists_at_[hidden])
Date: 2013-12-05 03:54:07


Hello,

I'm formatting a sink like this:
      sink->set_formatter
      (
        expr::stream
          << expr::attr<boost::posix_time::ptime>("TimeStamp")
          << " T:" << expr::attr<boost::thread::id>("ThreadID") << ":"
          << expr::smessage
      );
      logging::add_common_attributes();

For some reason ThreadID is empty. I tried to register the attribute explicitly:
      logging::core::get()->add_global_attribute("ThreadID",
logging::attributes::current_thread_id());
but it doesn't help.

The program is mutithreaded and linked with mt static libs.

Thanks.


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