MySQL 5.6.14 Source Code Document
|
#include <EventLogHandler.hpp>
Public Member Functions | |
EventLogHandler (const char *source_name) | |
virtual bool | open () |
virtual bool | close () |
virtual bool | is_open () |
virtual bool | setParam (const BaseString ¶m, const BaseString &value) |
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 () |
Static Public Member Functions | |
static int | printf (Logger::LoggerLevel m_level, const char *source_name, const char *msg,...) ATTRIBUTE_FORMAT(printf |
Additional Inherited Members | |
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) | |
virtual void | writeHeader (const char *category, Logger::LoggerLevel level)=0 |
virtual void | writeMessage (const char *pMsg)=0 |
virtual void | writeFooter ()=0 |
Log messages to the Windows event log
Example: // To make everything written to g_eventLogger also // end up in Windows event log g_eventLogger->createEventLoghandler("MySQL Cluster Management Server");
// To log a message(normally an error) before g_eventLogger has been created EventLogHandler::printf(LL_ERROR, "MySQL Cluster Management Server", "Failed to create shutdown event, error: %d", err);
Definition at line 35 of file EventLogHandler.hpp.
|
virtual |
Closes/free any allocated resources used by the log handler.
Implements LogHandler.
|
virtual |
|
virtual |
|
virtual |
Sets a parameters. What parameters are accepted depends on the subclass.
param | name of parameter |
value | value of parameter |
Implements LogHandler.