MySQL 8.4.0
Source Code Documentation
mysql_simple_error_log.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 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 Simplified error logging service
26*/
27
28#ifndef MYSQL_SIMPLE_ERROR_LOG_H_
29#define MYSQL_SIMPLE_ERROR_LOG_H_
30
32
33// Keep in sync with my_loglevel.h
34#define MYSQL_ERROR_LOG_SEVERITY_SYSTEM 0
35#define MYSQL_ERROR_LOG_SEVERITY_ERROR 1
36#define MYSQL_ERROR_LOG_SEVERITY_WARNING 2
37#define MYSQL_ERROR_LOG_SEVERITY_INFORMATION 3
38
39BEGIN_SERVICE_DEFINITION(mysql_simple_error_log)
41 (const char *component, const char *file,
42 unsigned long line, int severity, int error_id, ...));
43END_SERVICE_DEFINITION(mysql_simple_error_log)
44
45#define mysql_simple_error_log_emit(component, severity, error_id, ...) \
46 mysql_service_mysql_simple_error_log->emit(component, __FILE__, __LINE__, \
47 severity, error_id, __VA_ARGS__)
48#endif /* MYSQL_SIMPLE_ERROR_LOG_H_ */
static char * emit(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, unsigned char *null_value, unsigned char *error)
UDF function itself.
Definition: audit_api_message_emit.cc:429
Definition: os0file.h:89
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112