Re: [Cppcms-users] booster::log
Brought to you by:
artyom-beilis
From: Marcel H. <ke...@co...> - 2012-03-15 12:30:43
|
>> and two other questions: >> - what is the const char *module in should_be_logged, set_log_level >> and so on? It's a "string", of course, but where do I get the string for >> my sink?! > > This string is module name so you write: > > BOOSTER_WARNING("bank")<< "We run out of money"; > > This is handled automatically by macros for you. > > This string is a part of the message object. I don't get it. If I write something like this: using namespace booster::log; booster::shared_ptr<sinks::file> fsink(new sinks::file()); fsink->open("server.log"); fsink->max_files(2); booster::shared_ptr<sinks::standard_error> csink(new sinks::standard_error()); logger::instance().add_sink(fsink); logger::instance().add_sink(csink); because I want to different log levels, which one is which? :D so how do I edit the level of fsink and csink separate? Which module should i declare? Wouldn't it be easier to hand a pointer to the method?! Marcel |