MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
service_my_plugin_log.h
Go to the documentation of this file.
1 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; version 2 of the
6  License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16 
23 #ifndef MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
24 #define MYSQL_SERVICE_MY_PLUGIN_LOG_INCLUDED
25 
26 #ifndef MYSQL_ABI_CHECK
27 #include <stdarg.h>
28 #endif
29 
30 /* keep in sync with the loglevel enum in my_sys.h */
31 enum plugin_log_level
32 {
33  MY_ERROR_LEVEL,
34  MY_WARNING_LEVEL,
35  MY_INFORMATION_LEVEL
36 };
37 
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 extern struct my_plugin_log_service
44 {
46  int (*my_plugin_log_message)(MYSQL_PLUGIN *, enum plugin_log_level, const char *, ...);
48 
49 #ifdef MYSQL_DYNAMIC_PLUGIN
50 
51 #define my_plugin_log_message my_plugin_log_service->my_plugin_log_message
52 
53 #else
54 
55 int my_plugin_log_message(MYSQL_PLUGIN *plugin, enum plugin_log_level level,
56  const char *format, ...);
57 
58 #endif
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif