MySQL 8.0.40
Source Code Documentation
|
Default logger which is internally used by GCS and XCOM if nothing else is injected by Group Replication. More...
#include <gcs_logging_system.h>
Public Member Functions | |
Gcs_default_logger (Gcs_async_buffer *sink) | |
~Gcs_default_logger () override=default | |
enum_gcs_error | initialize () override |
Default logger initialization method. More... | |
enum_gcs_error | finalize () override |
Default logger finalization method. More... | |
void | log_event (const gcs_log_level_t level, const std::string &message) override |
Asynchronously forwards the received message to a sink. More... | |
Public Member Functions inherited from Logger_interface | |
~Logger_interface () override=default | |
Define a virtual destructor as instances of this interface can be polymorphically used. More... | |
Public Member Functions inherited from Common_interface | |
virtual | ~Common_interface ()=default |
Define a virtual destructor as instances of this interface can be polymorphically used. More... | |
Private Member Functions | |
Gcs_default_logger (Gcs_default_logger &l) | |
Gcs_default_logger & | operator= (const Gcs_default_logger &l) |
Private Attributes | |
Gcs_async_buffer * | m_sink |
Reference to an asynchronous buffer that encapsulates a sink. More... | |
Default logger which is internally used by GCS and XCOM if nothing else is injected by Group Replication.
|
explicit |
|
overridedefault |
|
private |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Asynchronously forwards the received message to a sink.
This method prepares the message and writes it to an in-memory buffer. If there is no free entry in the in-memory buffer, the call blocks until an entry becomes available.
Note that the write to the sink is done asynchronously.
This method shouldn't be invoked directly in the code, as it is wrapped by the MYSQL_GCS_LOG_[LEVEL] macros which deal with the rendering of the logging message into a final string that is then handed alongside with the level to this method.
level | logging level of the message |
message | rendered string of the logging message |
Implements Logger_interface.
|
private |
|
private |
Reference to an asynchronous buffer that encapsulates a sink.