4 #include <Poco/ConsoleChannel.h>
5 #include <Poco/FileChannel.h>
6 #include <Poco/FormattingChannel.h>
7 #include <Poco/PatternFormatter.h>
8 #include <Poco/Logger.h>
9 #include <Poco/AutoPtr.h>
21 : debugLevel(debugLevel_), postfix(postfix_)
23 Poco::AutoPtr<Poco::ConsoleChannel> pCons(
new Poco::ConsoleChannel());
26 Poco::Logger::get(debugLevel).setChannel(pCons);
27 Poco::Logger::get(debugLevel).setLevel(debugLevel);
32 std::stringstream outMsg, fmtMsg;
33 outMsg << std::setw(width) << msg;
38 fmtMsg << std::string(outMsg.str().length()+1,
'=') <<
"\n" << outMsg.str() <<
"\n" << std::string(outMsg.str().length()+1,
'=');
39 int level = Poco::Logger::get(debugLevel).getLevel();
40 Poco::Logger::get(debugLevel).log(Poco::Message(
"", fmtMsg.str(),
static_cast<Poco::Message::Priority
>(level)));
45 std::ostringstream outMsg;
52 std::ostringstream outMsg;