You can macro-up

> logstream << Level::getInfo() << "Player started with SYPHON " << SYPHON <<
> ", FBO " << FBO << ", DEMO " << DEMO << LOG4CXX_ENDMSG;

as
    LOG4CXX_INFO(logger,  "Player started with SYPHON " << SYPHON <<
", FBO " << FBO << ", DEMO " << DEMO);
out-of-the box.  In my own work, I have added macros to provide a
default logger to to turn it into
    INFO("Player started with SYPHON " << SYPHON << ", FBO " << FBO <<
", DEMO " << DEMO);
if my default logger is desired or as
    INFO(nondefault, "Player started with SYPHON " << SYPHON << ", FBO
" << FBO << ", DEMO " << DEMO);
if it is not.

Getting the 1- vs 2-argument working requires some arity-detection work:
https://github.com/RhysU/suzerain/blob/master/suzerain/support/logging.hpp

Hope that helps,
Rhys

Reply via email to