Can I use LineID attribute for this? I hope I could use sink::set_formatter to do this instead of using
__LINE__
and
__FILE__
in each log statement.
I struggled with this, until I found this snippet
#define LFC1_LOG_TRACE(logger) \
BOOST_LOG_SEV(logger, trivial::trace) << "(" << __FILE__ << ", " << __LINE__ << ") "
Works like a charm