|
#include <CFileLog.h>

Public Member Functions | |
| virtual void | saveMessage (CDateTime date, const char *message, uint32_t sz, const CLogPriority *priority) throw (CException) |
| Stores or sends log message to actual destination. | |
| CFileLog (std::string fileName) | |
| Constructor. | |
| virtual | ~CFileLog () |
| Destructor. | |
| virtual void | reset () throw (CException) |
| Restarts the log. | |
| std::string | fileName () const |
| Returns log file name. | |
A simplest possible way to implement logging. The log file is created automatically if it doesn't exist.
| sptk::CFileLog::CFileLog | ( | std::string | fileName | ) | [inline] |
Constructor.
Creates a new log object based on the file name. If this file doesn't exist - it will be created.
| fileName | string, log file name |
| virtual sptk::CFileLog::~CFileLog | ( | ) | [virtual] |
Destructor.
Destructs the log object, closes the log file, releases all the allocated resources
| virtual void sptk::CFileLog::reset | ( | ) | throw (CException) [virtual] |
Restarts the log.
The current log content is cleared. The file is recreated.
Reimplemented from sptk::CBaseLog.
| virtual void sptk::CFileLog::saveMessage | ( | CDateTime | date, | |
| const char * | message, | |||
| uint32_t | sz, | |||
| const CLogPriority * | priority | |||
| ) | throw (CException) [virtual] |
Stores or sends log message to actual destination.
| date | CDateTime, message timestamp | |
| message | const char *, message text | |
| sz | uint32_t, message size | |
| priority | CLogPriority, message priority. |
Reimplemented from sptk::CBaseLog.