Boost logo

Boost Users :

Subject: [Boost-users] Include line number in boost logs
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2015-08-24 11:27:16


I try to implement that a log entry also logs its line number with
boost::log. If any developer of it reads here, please also consider this a
wishlist item...

I think the best way to add an additional attribute for it

  "Line", attributes::mutable_constant<size_t>(0)

in my logger config that is called once at startup.

#define logInfo(methodname, message) \
  BOOST_LOG_SEV(_log, boost::log::trivial::severity_level::trace) << message

Is my idea, but

boostlog.cpp:126:5: error: no member named 'set' in

getting the attribute somehow seems to work, but how can I set the value of
the attribute?


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