1 #include <Poco/FileChannel.h>
5 #ifndef USE_POCO_LOGGER
6 #define USE_POCO_LOGGER 1
9 #if USE_POCO_LOGGER == 1
10 #include <Poco/Logger.h>
19 : inherited(), logBuf(), pBuf(nullptr), prefix(
""), suffix(
""), logPriority(
Priority::PRIO_NONE), source(source_)
44 std::string result = logBuf.str();
52 logPriority = logPriority_;
58 return log(static_cast<unsigned int>(priority));
68 loggable = [](
const std::string&
data) {
return data;};
73 *
this << prefix << loggable(data) << suffix;
79 std::stringstream str;
88 std::stringstream str;
99 #if USE_POCO_LOGGER == 1
100 static Poco::Logger& logger = Poco::Logger::root();
106 catch(Poco::Exception& e)
108 std::cerr <<
"LoggerStream: " << e.displayText() <<
std::endl;
113 std::ostream&
endl(std::ostream& os)
126 std::ostream&
flush(std::ostream& os)