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

#include <extension.h>

Public Attributes

const char *(* get_name )(void)
void(* log )(EXTENSION_LOG_LEVEL severity, const void *client_cookie, const char *fmt,...)

Detailed Description

Log extensions should provide the following rescriptor when they register themselves. Please note that if you register a log extension it will <u>replace</u> old one. If you want to be nice to the user you should allow your logger to be chained.

Please note that the memcached server will not call the log function if the verbosity level is too low. This is a perfomance optimization from the core to avoid potential formatting of output that may be thrown away.

Definition at line 88 of file extension.h.

Member Data Documentation

const char*(* EXTENSION_LOGGER_DESCRIPTOR::get_name)(void)

Get the name of the descriptor. The memory area returned by this function has to be valid until the descriptor is unregistered.

Definition at line 93 of file extension.h.

void(* EXTENSION_LOGGER_DESCRIPTOR::log)(EXTENSION_LOG_LEVEL severity, const void *client_cookie, const char *fmt,...)

Add an entry to the log.

Parameters
severitythe severity for this log entry
client_cookiethe client we're serving (may be NULL if not known)
fmtformat string to add to the log

Definition at line 102 of file extension.h.


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