Hi,

I'm havving a bad time trying to figure out how to add and log custom keywords using boost/log.

I havent been able to understand how exactly attribute keywords (BOOST_LOG_ATTRIBUTE_KEYWORD) bind with logging e.g. using BOOST_LOG_STREAM_WITH_PARAMS(logger, (??) (??)).

For instance, if I define a keyword line_number,

BOOST_LOG_ATTRIBUTE_KEYWORD(line_number, "LineNumber", unsigned int)

and add it to the formmater


logging::formatter formatter = expr::stream << "[" << line_number << "]"

How do I use

BOOST_LOG_STREAM_WITH_PARAMS(logger, (??))

Tanking an exemple from the severities, I should use a keyword parameter defining something like

BOOST_PARAMETER_KEYWORD(sometag, line_number)

then I should be able to use

BOOST_LOG_STREAM_WITH_PARAMS(logger, (line_number = 10))

But those things just don add up together.

I for sure missing the logics of the logging ...

Thanks for any help!

Cheers,
mc