Default debugger which is used only by GCS and XCOM.
More...
#include <gcs_logging_system.h>
Default debugger which is used only by GCS and XCOM.
◆ Gcs_default_debugger() [1/2]
◆ ~Gcs_default_debugger()
virtual Gcs_default_debugger::~Gcs_default_debugger |
( |
| ) |
|
|
virtualdefault |
◆ Gcs_default_debugger() [2/2]
◆ append_prefix()
size_t Gcs_default_debugger::append_prefix |
( |
char * |
buffer | ) |
|
|
inlineprivate |
Add extra information as a message prefix.
We assume that there is room to accommodate it. Before changing this method, make sure the maximum buffer size will always have room to accommodate any new information.
- Returns
- Return the size of appended information
◆ append_sufix()
size_t Gcs_default_debugger::append_sufix |
( |
char * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
inlineprivate |
Append information into a message such as end of line.
We assume that there is room to accommodate it. Before changing this method, make sure the maximum buffer size will always have room to accommodate any new information.
- Returns
- Return the size of appended information
◆ finalize()
Default debugger finalization method.
- Returns
- GCS_OK
◆ get_entry()
Get a reference to the in-memory buffer where the message content will be copied to if there is any.
◆ initialize()
Default debugger initialization method.
- Returns
- GCS_OK
◆ log_event() [1/4]
void Gcs_default_debugger::log_event |
( |
const char * |
format, |
|
|
va_list |
args |
|
) |
| |
|
inline |
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.
- Parameters
-
[in] | format | Message format using a c-style string |
[in] | args | Arguments to fill in the format string |
◆ log_event() [2/4]
template<typename... Args>
void Gcs_default_debugger::log_event |
( |
const int64_t |
options, |
|
|
Args... |
args |
|
) |
| |
|
inline |
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.
- Parameters
-
[in] | options | Debug options that are associated with the message |
[in] | args | Arguments This includes the c-style string and arguments to fill it in |
◆ log_event() [3/4]
void Gcs_default_debugger::log_event |
( |
const std::string & |
message | ) |
|
Default debugger simply forwards the received message to a sink.
- Parameters
-
message | rendered string of the logging message |
◆ log_event() [4/4]
void Gcs_default_debugger::log_event |
( |
int64_t |
options, |
|
|
const char * |
message |
|
) |
| |
|
inline |
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.
- Parameters
-
[in] | options | Debug options that are associated with the message |
[in] | message | Message to be written to the in-memory buffer |
◆ notify_entry()
Notify that the in-memory buffer were filled in and is ready to be consumed.
◆ operator=()
◆ m_sink
Reference to an asynchronous buffer that encapsulates a sink.
The documentation for this class was generated from the following files: