Overview
Features
Download
Documentation
Community
Add-Ons & Services

Logger

Please post support and help requests here.

Logger

Postby vonkanaitor » 31 Dec 2012, 12:36

Code: Select all
AutoPtr<ConsoleChannel> pCons(new ConsoleChannel);
   AutoPtr<PatternFormatter> PatternForm(new PatternFormatter);
   PatternForm->setProperty("pattern", "%Y-%m-%d %H:%M:%S %s: %t");
   AutoPtr<FormattingChannel> pFC(new FormattingChannel(PatternForm, pCons));
   
   AutoPtr<FileChannel>pFileChan(new FileChannel("Arc.log"));
   AutoPtr<FormattingChannel>pFFC(new FormattingChannel(PatternForm, pFileChan));
   
   AutoPtr<SplitterChannel> sLog(new SplitterChannel);
   sLog->addChannel(pFC);
   sLog->addChannel(pFFC);
   
   //Logger& pLog = Logger::create("ConsoleChannel", sLog, Message::PRIO_INFORMATION);


Ive tried and failed. How do i do it properly and also, how can i use this Logger throughout my entire server, or will i have to create a new Logger each time?
vonkanaitor
 
Posts: 4
Joined: 11 Dec 2012, 20:00

Re: Logger

Postby vonkanaitor » 02 Jan 2013, 00:17

Ive fixed my logging system. However, how can i access it from multiple classes; this is probably very basic but i think ive missed a few lessons XD
vonkanaitor
 
Posts: 4
Joined: 11 Dec 2012, 20:00


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests