+ if(m_logtype=="file")\r
+ {\r
+ Poco::AutoPtr<Poco::FileChannel> fc=new Poco::FileChannel("fms.log");\r
+ fc->setProperty("rotation","daily"); // rotate log file daily\r
+ fc->setProperty("times","utc"); // utc date/times for log entries\r
+ fc->setProperty("archive","timestamp"); // add timestamp to old logs\r
+ fc->setProperty("purgeCount","30"); // purge old logs after 30 logs have accumulated\r
+ fc->setProperty("compress","true"); // gz compress old log files\r
+ formatter->setChannel(fc);\r
+ }\r
+ else\r
+ {\r
+ if(m_logtype=="stdout")\r
+ {\r
+ Poco::AutoPtr<Poco::ConsoleChannel> cc=new Poco::ConsoleChannel(std::cout);\r
+ formatter->setChannel(cc);\r
+ }\r
+ else\r
+ {\r
+ Poco::AutoPtr<Poco::ConsoleChannel> cc=new Poco::ConsoleChannel(std::cerr);\r
+ formatter->setChannel(cc);\r
+ }\r
+ }\r
+ \r
+ setLogger(Poco::Logger::create("logfile",formatter,Poco::Message::PRIO_INFORMATION));\r
+ Poco::Logger::get("logfile").information("LogLevel set to "+tempval);\r
+ Poco::Logger::get("logfile").setLevel(initiallevel);\r