MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventLogHandler Class Reference

#include <EventLogHandler.hpp>

Inheritance diagram for EventLogHandler:
Collaboration diagram for EventLogHandler:

Public Member Functions

 EventLogHandler (const char *source_name)
virtual bool open ()
virtual bool close ()
virtual bool is_open ()
virtual bool setParam (const BaseString &param, 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 &params)
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

Detailed Description

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.

Member Function Documentation

virtual bool EventLogHandler::close ( )
virtual

Closes/free any allocated resources used by the log handler.

Returns
true if successful.

Implements LogHandler.

virtual bool EventLogHandler::is_open ( )
virtual

Check if LogHandler is open

Returns
true if open.

Implements LogHandler.

virtual bool EventLogHandler::open ( )
virtual

Opens/initializes the log handler.

Returns
true if successful.

Implements LogHandler.

virtual bool EventLogHandler::setParam ( const BaseString param,
const BaseString value 
)
virtual

Sets a parameters. What parameters are accepted depends on the subclass.

Parameters
paramname of parameter
valuevalue of parameter

Implements LogHandler.


The documentation for this class was generated from the following file: