#include "Poco/ConsoleChannel.h"
#include "Poco/FormattingChannel.h"
#include "Poco/PatternFormatter.h"
#include "Poco/Logger.h"
#include "Poco/AutoPtr.h"
#include "Poco/FileChannel.h"
#include "Poco/Thread.h"
#include "Poco/Runnable.h"
using Poco::ConsoleChannel;
using Poco::FormattingChannel;
using Poco::PatternFormatter;
using Poco::Logger;
using Poco::AutoPtr;
using Poco::FileChannel;
using Poco::Thread;
int main(int argc, char** argv)
{
//AutoPtr pCons(new ConsoleChannel);
AutoPtr pChannel(new FileChannel);
pChannel->setProperty("path", "Iris.log");
pChannel->setProperty("rotation", "never");
pChannel->setProperty("archive", "timestamp");
//Logger::root().setChannel(pChannel);
AutoPtr pPF(new PatternFormatter);
pPF->setProperty("pattern", "%Y-%m-%d %H:%M:%S %s: %t");
AutoPtr pFC(new FormattingChannel(pPF, pChannel));
Logger::root().setChannel(pFC);
Logger::get("TestChannel").information("This is a test");
return 0;
}