MySQL 5.6.14 Source Code Document
|
#include <SysLogHandler.hpp>
Public Member Functions | |
SysLogHandler () | |
SysLogHandler (const char *pIdentity, int facility) | |
virtual | ~SysLogHandler () |
virtual bool | open () |
virtual bool | close () |
virtual bool | is_open () |
virtual bool | setParam (const BaseString ¶m, const BaseString &value) |
bool | setFacility (const BaseString &facility) |
Public Member Functions inherited from LogHandler | |
LogHandler () | |
virtual | ~LogHandler () |
virtual const char * | handler_type () |
void | append (const char *pCategory, Logger::LoggerLevel level, const char *pMsg) |
void | append_impl (const char *pCategory, Logger::LoggerLevel level, const char *pMsg) |
const char * | getDefaultHeader (char *pStr, const char *pCategory, Logger::LoggerLevel level) const |
const char * | getDefaultFooter () const |
const char * | getDateTimeFormat () const |
void | setDateTimeFormat (const char *pFormat) |
int | getErrorCode () const |
void | setErrorCode (int code) |
char * | getErrorStr () |
void | setErrorStr (const char *str) |
bool | parseParams (const BaseString ¶ms) |
virtual bool | checkParams () |
virtual void | setRepeatFrequency (unsigned val) |
virtual bool | getParams (BaseString &config) |
virtual off_t | getCurrentSize () |
virtual off_t | getMaxSize () |
Protected Member Functions | |
virtual void | writeHeader (const char *pCategory, Logger::LoggerLevel level) |
virtual void | writeMessage (const char *pMsg) |
virtual void | writeFooter () |
Protected Member Functions inherited from LogHandler | |
STATIC_CONST (MAX_DATE_TIME_HEADER_LENGTH=64) | |
STATIC_CONST (MAX_HEADER_LENGTH=128) | |
STATIC_CONST (MAX_FOOTER_LENGTH=128) |
Logs messages to syslog. The default identity is 'NDB'. See 'man 3 syslog'.
It logs the following severity levels.
LOG_ALERT A condition that should be corrected immediately, such as a corrupted system database.
LOG_CRIT Critical conditions, such as hard device errors.
LOG_ERR Errors.
LOG_WARNING Warning messages.
LOG_INFO Informational messages.
LOG_DEBUG Messages that contain information nor- mally of use only when debugging a pro- gram.
Definition at line 51 of file SysLogHandler.hpp.
SysLogHandler::SysLogHandler | ( | ) |
Default constructor.
Definition at line 28 of file SysLogHandler.cpp.
SysLogHandler::SysLogHandler | ( | const char * | pIdentity, |
int | facility | ||
) |
Create a new syslog handler with the specified identity.
pIdentity | a syslog identity. |
facility | syslog facility, defaults to LOG_USER |
Definition at line 36 of file SysLogHandler.cpp.
|
virtual |
Destructor.
Definition at line 45 of file SysLogHandler.cpp.
|
virtual |
Closes/free any allocated resources used by the log handler.
Implements LogHandler.
Definition at line 59 of file SysLogHandler.cpp.
|
virtual |
Check if LogHandler is open
Implements LogHandler.
Definition at line 67 of file SysLogHandler.cpp.
|
virtual |
Opens/initializes the log handler.
Implements LogHandler.
Definition at line 50 of file SysLogHandler.cpp.
|
virtual |
Sets a parameters. What parameters are accepted depends on the subclass.
param | name of parameter |
value | value of parameter |
Implements LogHandler.
Definition at line 119 of file SysLogHandler.cpp.
|
protectedvirtual |
Write the footer to the log.
Implements LogHandler.
Definition at line 112 of file SysLogHandler.cpp.
|
protectedvirtual |
Write the header to the log.
pCategory | the category to tag the log with. |
level | the log level. |
Implements LogHandler.
Definition at line 73 of file SysLogHandler.cpp.
|
protectedvirtual |
Write the message to the log.
pMsg | the message to log. |
Implements LogHandler.
Definition at line 106 of file SysLogHandler.cpp.