MySQL 9.1.0
Source Code Documentation
gcs_logger.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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#ifndef GCS_LOGGER_INCLUDED
25#define GCS_LOGGER_INCLUDED
26
28
29/**
30 Group Replication implementation of Logger_interface
31
32 Once a instance of this logger is set at Gcs_interface, all log
33 produced by MySQL GCS will be routed by this logger to MySQL
34 error log.
35*/
37 public:
38 /**
39 Constructor.
40 */
41 Gcs_gr_logger_impl() = default;
42
43 /**
44 Destructor.
45 */
46 ~Gcs_gr_logger_impl() override = default;
47
48 /**
49 Initialize the logger.
50
51 @return the operation status
52 @retval GCS_OK Success
53 @retval GCS_NOK Error
54 */
55 enum_gcs_error initialize() override;
56
57 /**
58 Finalize the logger.
59
60 @return the operation status
61 @retval GCS_OK Success
62 @retval GCS_NOK Error
63 */
64 enum_gcs_error finalize() override;
65
66 /**
67 Log a message using the specified level.
68
69 @param[in] level logging level of message
70 @param[in] message the message to log
71 */
72 void log_event(const gcs_log_level_t level,
73 const std::string &message) override;
74
75 /*
76 Disabling copy constructor and assignment operator.
77 */
78 private:
81};
82
83#endif /* GCS_LOGGER_INCLUDED */
Group Replication implementation of Logger_interface.
Definition: gcs_logger.h:36
void log_event(const gcs_log_level_t level, const std::string &message) override
Log a message using the specified level.
Definition: gcs_logger.cc:40
enum_gcs_error initialize() override
Initialize the logger.
Definition: gcs_logger.cc:30
Gcs_gr_logger_impl()=default
Constructor.
~Gcs_gr_logger_impl() override=default
Destructor.
Gcs_gr_logger_impl(Gcs_gr_logger_impl &l)
Gcs_gr_logger_impl & operator=(const Gcs_gr_logger_impl &l)
enum_gcs_error finalize() override
Finalize the logger.
Definition: gcs_logger.cc:35
Logger interface that must be used to define a logger object.
Definition: gcs_logging.h:125
gcs_log_level_t
Definition: gcs_logging.h:108
enum_gcs_error
This enumeration describes errors which can occur during group communication operations.
Definition: gcs_types.h:41