MySQL 8.3.0
Source Code Documentation
mysql_simple_error_log.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23/**
24 Simplified error logging service
25*/
26
27#ifndef MYSQL_SIMPLE_ERROR_LOG_H_
28#define MYSQL_SIMPLE_ERROR_LOG_H_
29
31
32// Keep in sync with my_loglevel.h
33#define MYSQL_ERROR_LOG_SEVERITY_SYSTEM 0
34#define MYSQL_ERROR_LOG_SEVERITY_ERROR 1
35#define MYSQL_ERROR_LOG_SEVERITY_WARNING 2
36#define MYSQL_ERROR_LOG_SEVERITY_INFORMATION 3
37
38BEGIN_SERVICE_DEFINITION(mysql_simple_error_log)
40 (const char *component, const char *file,
41 unsigned long line, int severity, int error_id, ...));
42END_SERVICE_DEFINITION(mysql_simple_error_log)
43
44#define mysql_simple_error_log_emit(component, severity, error_id, ...) \
45 mysql_service_mysql_simple_error_log->emit(component, __FILE__, __LINE__, \
46 severity, error_id, __VA_ARGS__)
47#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:428
Definition: os0file.h:88
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111