AutoPtr<SplitterChannel> splitterChannel(new SplitterChannel());
AutoPtr<Channel> consoleChannel(new ConsoleChannel());
AutoPtr<Channel> fileChannel(new FileChannel("Arcanite.log"));
AutoPtr<FileChannel> rotatedFileChannel(new FileChannel("Arcanite_R.log"));
rotatedFileChannel->setProperty("rotation", "100");
rotatedFileChannel->setProperty("archive", "timestamp");
splitterChannel->addChannel(consoleChannel);
splitterChannel->addChannel(fileChannel);
splitterChannel->addChannel(rotatedFileChannel);
//"%d-%m-%Y %H:%M:%S: %t"
AutoPtr<Formatter> formatter(new PatternFormatter("%d-%m-%Y %H:%M:%S %s: %t"));
AutoPtr<Channel> formattingChannel(new FormattingChannel(formatter, splitterChannel));
Logger& sLog = Logger::create("LogChan", formattingChannel, Message::PRIO_TRACE);
Ive written my logger which i want to use for my server, in multiple classes. How can i adapt this to do this? This is probably basic c++ but i seem to have missed a few lessons :P