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