LOG4CXX_INFO(logger, "Player started with SYPHON " << SYPHON << ", FBO " << FBO << ", DEMO " << DEMO); This would be exactly the type of syntax that can save me from using logstreams. Didn't realize I could macro like that.
thanks On Mon, Jan 13, 2014 at 4:42 PM, Rhys Ulerich <rhys.uler...@gmail.com>wrote: > 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 >