24#ifndef GCS_LOGGING_INCLUDED 
   25#define GCS_LOGGING_INCLUDED 
   89  virtual void log_event(
const std::string &message) = 0;
 
   98  virtual void log_event(
const char *message, 
size_t message_size) = 0;
 
  116    "[MYSQL_GCS_FATAL] ", 
"[MYSQL_GCS_ERROR] ", 
"[MYSQL_GCS_WARN] ",
 
  117    "[MYSQL_GCS_INFO] "};
 
  143                         const std::string &message) = 0;
 
  222#if !defined(GCS_XCOM_DEBUG_INFORMATION) 
  223#define GCS_XCOM_DEBUG_INFORMATION 
  250    "GCS_DEBUG_BASIC",  
"GCS_DEBUG_TRACE",    
"XCOM_DEBUG_BASIC",
 
  251    "XCOM_DEBUG_TRACE", 
"GCS_DEBUG_MSG_FLOW", 
"XCOM_DEBUG_MSG_FLOW",
 
  252    "GCS_DEBUG_ALL",    
"GCS_DEBUG_NONE",
 
  378                                int64_t &res_debug_options);
 
  391                                std::string &res_debug_options);
 
Common interface that is used to define the sink and logger interfaces.
Definition: gcs_logging.h:38
 
virtual ~Common_interface()=default
Define a virtual destructor as instances of this interface can be polymorphically used.
 
virtual enum_gcs_error finalize()=0
The purpose of this method is to free any resources used by the objects that implement this interface...
 
virtual enum_gcs_error initialize()=0
The purpose of this method is to initialize resources used by the objects that implement this interfa...
 
Definition: gcs_logging.h:268
 
static bool force_debug_options(const int64_t debug_options)
Change the current set of debug options by the new debug options expressed as an integer parameter.
Definition: gcs_logging.cc:203
 
static unsigned int get_number_debug_options()
Get the the number of possible debug options.
Definition: gcs_logging.cc:183
 
static const std::string m_debug_all
String that represents the GCS_DEBUG_ALL;.
Definition: gcs_logging.h:283
 
static bool test_debug_options(const int64_t debug_options)
Verify whether any of the debug options are defined.
Definition: gcs_logging.h:320
 
static std::atomic< std::int64_t > m_debug_options
The debug level enabled which is by default GCS_DEBUG_NONE;.
Definition: gcs_logging.h:273
 
static bool is_valid_debug_options(const int64_t debug_options)
Check whether the set of debug options is valid or not including GCS_DEBUG_NONE and GCS_DEBUG_ALL.
Definition: gcs_logging.cc:75
 
static int64_t load_debug_options()
Atomically load information on debug options.
Definition: gcs_logging.h:290
 
static int64_t get_valid_debug_options()
Get the set of valid debug options excluding GCS_DEBUG_NONE and GCS_DEBUG_ALL.
Definition: gcs_logging.cc:63
 
static void store_debug_options(int64_t debug_options)
Atomically store information on debug options.
Definition: gcs_logging.h:303
 
static const std::string m_debug_none
String that represents the GCS_DEBUG_NONE;.
Definition: gcs_logging.h:278
 
static int64_t get_current_debug_options()
Get the current set of debug options.
Definition: gcs_logging.cc:88
 
static bool get_debug_options(const std::string &debug_options, int64_t &res_debug_options)
Get the set of debug options passed as parameter as an unsigned integer.
Definition: gcs_logging.cc:134
 
static bool unset_debug_options(const int64_t debug_options)
Reduce the current set of debug options by disabling the debug options expressed as an integer parame...
Definition: gcs_logging.cc:227
 
static bool set_debug_options(const int64_t debug_options)
Extend the current set of debug options with new debug options expressed as an integer parameter.
Definition: gcs_logging.cc:187
 
This class sets up and configures the logging infrastructure, storing the logger to be used by the ap...
Definition: gcs_logging.h:153
 
static enum_gcs_error finalize()
Free any resource used in the logging system.
Definition: gcs_logging.cc:44
 
static Logger_interface * m_logger
Definition: gcs_logging.h:155
 
static Logger_interface * get_logger()
Get a reference to the logger object if there is any.
Definition: gcs_logging.cc:37
 
static enum_gcs_error initialize(Logger_interface *logger)
Set the logger object and initialize it by invoking its initialization method.
Definition: gcs_logging.cc:39
 
Logger interface that must be used to define a logger object.
Definition: gcs_logging.h:125
 
virtual void log_event(const gcs_log_level_t level, const std::string &message)=0
The purpose of this method is to deliver to the logging system any message to be logged.
 
~Logger_interface() override=default
Define a virtual destructor as instances of this interface can be polymorphically used.
 
Common sink that may be shared by the logging and debugging systems.
Definition: gcs_logging.h:74
 
virtual void log_event(const char *message, size_t message_size)=0
The purpose of this method is to effectively log the information.
 
~Sink_interface() override=default
Define a virtual destructor as instances of this interface can be polymorphically used.
 
virtual const std::string get_information() const =0
The purpose of this method is to return information on the sink such as its location.
 
virtual void log_event(const std::string &message)=0
The purpose of this method is to effectively log the information.
 
static const char *const gcs_log_levels[]
Definition: gcs_logging.h:115
 
static const char *const gcs_xcom_debug_strings[]
Definition: gcs_logging.h:249
 
gcs_xcom_debug_option_t
Definition: gcs_logging.h:237
 
@ XCOM_DEBUG_TRACE
Definition: gcs_logging.h:242
 
@ GCS_DEBUG_TRACE
Definition: gcs_logging.h:240
 
@ GCS_INVALID_DEBUG
Definition: gcs_logging.h:245
 
@ GCS_DEBUG_MSG_FLOW
Definition: gcs_logging.h:243
 
@ GCS_DEBUG_ALL
Definition: gcs_logging.h:246
 
@ XCOM_DEBUG_MSG_FLOW
Definition: gcs_logging.h:244
 
@ GCS_DEBUG_BASIC
Definition: gcs_logging.h:239
 
@ XCOM_DEBUG_BASIC
Definition: gcs_logging.h:241
 
@ GCS_DEBUG_NONE
Definition: gcs_logging.h:238
 
gcs_log_level_t
Definition: gcs_logging.h:108
 
@ GCS_FATAL
Definition: gcs_logging.h:109
 
@ GCS_ERROR
Definition: gcs_logging.h:110
 
@ GCS_WARN
Definition: gcs_logging.h:111
 
@ GCS_INFO
Definition: gcs_logging.h:112
 
enum_gcs_error
This enumeration describes errors which can occur during group communication operations.
Definition: gcs_types.h:41
 
static Logger logger
The "top-level" logger used when no connection context is given.
Definition: test_trace_plugin.cc:296