|
Boost : |
Subject: [boost] Boost log issues and workarounds
From: hh h (jupiter.hce_at_[hidden])
Date: 2019-01-17 08:33:42
Hi,
I like the boost log, but there are many small issues, appreciate your
kind help:
I followed the following link to use a good macro LOG:
https://stackoverflow.com/questions/35895199/boost-log-and-severity-local-attributes
But calling LOG(error) caused much trouble for the name space
collision, alternative is to use full namespace
boost::log::trivial::error, but that is too cumbersome,I tried to use
an uppercase ERROR to replace it in an enum ERROR =
boost::log::trivial::error, obviously that could not be complied,
although it is defined as enum severity_level in trivial.hpp, it does
not look like the boost::log::trivial::error is an enum value. Any
workarounds?
Another issue from that link is it has to call LOGGABLE prior to call
LOG(error) in each function, that makes more clumsy, software
developers in my team are not happy about it. Any workaround to have a
fixed argument in BOOST_LOG_STREAM_WITH_PARAMS, without need to claim
boost::log::sources::severity_logger<boost::log::trivial::severity_level>
slg; in each function? You guys are genius that must be a way to do
it, appreciate your advice.
Thank you
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk