|
#include <CProxyLog.h>

Public Member Functions | |
| CProxyLog (CBaseLog &destination) | |
| Constructor. | |
| virtual void | reset () throw (CException) |
| Restarts the log. | |
| virtual const CLogPriority & | defaultPriority () const |
| Returns the default priority. | |
| virtual const CLogPriority & | minPriority () const |
| Returns the min priority. | |
Protected Member Functions | |
| virtual void | defaultPriority (CLogPriority &priority) |
| The actual log to store messages to (destination log). | |
| virtual void | minPriority (const CLogPriority &prt) |
| Sets min message priority. | |
| virtual void | saveMessage (CDateTime date, const char *message, uint32_t sz, const CLogPriority *priority) throw (CException) |
| Sends log message to actual destination. | |
The destination log is locked for a message adding period. Multiple CProxyLog objects may send messages from different threads into the same destination log. The log options defining message format and min priority are used from destination log.
| sptk::CProxyLog::CProxyLog | ( | CBaseLog & | destination | ) | [inline] |
Constructor.
Creates a new log object based on the file name. If this file doesn't exist - it will be created.
| destination | CBaseLog&, destination log object |
| virtual const CLogPriority& sptk::CProxyLog::defaultPriority | ( | ) | const [inline, virtual] |
Returns the default priority.
The default priority is used for the new message, if you are not defining priority.
Reimplemented from sptk::CBaseLog.
References sptk::CBaseLog::defaultPriority().
| virtual void sptk::CProxyLog::defaultPriority | ( | CLogPriority & | priority | ) | [inline, protected, virtual] |
The actual log to store messages to (destination log).
Sets the default priority Does nothing since the priority should be defined for the shared (parent) log object
| priority | CLogPriority&, new default priority |
Reimplemented from sptk::CBaseLog.
| virtual const CLogPriority& sptk::CProxyLog::minPriority | ( | ) | const [inline, virtual] |
Returns the min priority.
Messages with priority less than requested are ignored
Reimplemented from sptk::CBaseLog.
References sptk::CBaseLog::minPriority().
| virtual void sptk::CProxyLog::minPriority | ( | const CLogPriority & | prt | ) | [inline, protected, virtual] |
Sets min message priority.
Does nothing since the min message priority should be defined for the shared (parent) log object
| prt | const CLogPriority&, min message priority |
Reimplemented from sptk::CBaseLog.
| virtual void sptk::CProxyLog::reset | ( | ) | throw (CException) [virtual] |
Restarts the log.
The current log content is cleared. The file is recreated.
Reimplemented from sptk::CBaseLog.
| virtual void sptk::CProxyLog::saveMessage | ( | CDateTime | date, | |
| const char * | message, | |||
| uint32_t | sz, | |||
| const CLogPriority * | priority | |||
| ) | throw (CException) [protected, virtual] |
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.