|
#include <CSysLog.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. | |
| CSysLog (uint32_t facilities=LOG_USER) | |
| Constructor. | |
| virtual | ~CSysLog () |
| Destructor. | |
Static Public Member Functions | |
| static void | programName (std::string progName) |
| Sets program name. | |
On *nix , the log is sent to *nix syslog daemon. On Windows NT/2000+/XP the log is sent to Event Log (Application). On Windows 95/98/ME the system log isn't supported.. The facility method allows to define - which system log is used
| sptk::CSysLog::CSysLog | ( | uint32_t | facilities = LOG_USER |
) |
Constructor.
Creates a new log object based on the syslog facility (or facilities). For Windows, parameter facilities is ignored and messages are stored into Application event log
| facilities | int, log facility or a set of facilities. |
| virtual sptk::CSysLog::~CSysLog | ( | ) | [virtual] |
Destructor.
Destructs the log object, closes the log descriptor, releases all the allocated resources
| static void sptk::CSysLog::programName | ( | std::string | progName | ) | [static] |
Sets program name.
The program name is optional. It is set for all the CSysLog objects at once. If set, it appears in the log as a message prefix. Every time the program name is changed, the log is closed to be re-opened on next message.
| progName | std::string, a program name |
| virtual void sptk::CSysLog::saveMessage | ( | CDateTime | date, | |
| const char * | message, | |||
| uint32_t | sz, | |||
| const CLogPriority * | priority | |||
| ) | throw (CException) [virtual] |
Stores or sends log message to actual destination.
This method should be overwritten by the actual log implementation
| date | CDateTime, message timestamp | |
| message | const char *, message text | |
| sz | uint32_t, message size | |
| priority | CLogPriority, message priority. |
Reimplemented from sptk::CBaseLog.