MySQL 8.0.39
Source Code Documentation
service_my_plugin_log.h
Go to the documentation of this file.
1/* Copyright (c) 2011, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/**
25 @file include/mysql/service_my_plugin_log.h
26 This service provides functions to report error conditions and log to
27 mysql error log.
28*/
29
30#ifndef MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
31#define MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
32
33#ifndef MYSQL_ABI_CHECK
34#include <stdarg.h>
35#endif
36
37/* keep in sync with the loglevel enum in my_sys.h */
42};
43
44/**
45 @ingroup group_ext_plugin_services
46
47 Enables plugins to log messages into the server's error log.
48*/
49extern "C" struct my_plugin_log_service {
50 /** Write a message to the log */
52 const char *, ...)
53 MY_ATTRIBUTE((format(printf, 3, 4)));
55
56#ifdef MYSQL_DYNAMIC_PLUGIN
57
58#define my_plugin_log_message my_plugin_log_service->my_plugin_log_message
59
60#else
61
63 const char *format, ...)
64 MY_ATTRIBUTE((format(printf, 3, 4)));
65
66#endif
67
68#endif
struct my_plugin_log_service * my_plugin_log_service
void * MYSQL_PLUGIN
Definition: plugin.h:82
plugin_log_level
Definition: service_my_plugin_log.h:38
@ MY_ERROR_LEVEL
Definition: service_my_plugin_log.h:39
@ MY_WARNING_LEVEL
Definition: service_my_plugin_log.h:40
@ MY_INFORMATION_LEVEL
Definition: service_my_plugin_log.h:41
int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level, const char *format,...)
Definition: log.cc:2328
Enables plugins to log messages into the server's error log.
Definition: service_my_plugin_log.h:49
int(* my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *,...)
Write a message to the log.
Definition: service_my_plugin_log.h:51