MySQL 8.0.39
Source Code Documentation
Gcs_debug_options Class Reference

#include <gcs_logging.h>

Inheritance diagram for Gcs_debug_options:
[legend]

Static Public Member Functions

static int64_t load_debug_options ()
 Atomically load information on debug options. More...
 
static void store_debug_options (int64_t debug_options)
 Atomically store information on debug options. More...
 
static bool test_debug_options (const int64_t debug_options)
 Verify whether any of the debug options are defined. More...
 
static int64_t get_current_debug_options ()
 Get the current set of debug options. More...
 
static int64_t get_current_debug_options (std::string &res_debug_options)
 Get the current set of debug options as an integer value and as a string separated by comma. More...
 
static int64_t get_valid_debug_options ()
 Get the set of valid debug options excluding GCS_DEBUG_NONE and GCS_DEBUG_ALL. More...
 
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. More...
 
static bool is_valid_debug_options (const std::string &debug_options)
 Check whether the set of debug options is valid or not including GCS_DEBUG_NONE and GCS_DEBUG_ALL. More...
 
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. More...
 
static bool get_debug_options (const int64_t debug_options, std::string &res_debug_options)
 Get the set of debug options passed as parameter as a string. More...
 
static unsigned int get_number_debug_options ()
 Get the the number of possible debug options. More...
 
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. More...
 
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. More...
 
static bool set_debug_options (const std::string &debug_options)
 Extend the current set of debug options with new debug options expressed as a string. More...
 
static bool force_debug_options (const std::string &debug_options)
 Changed the current set of debug options by the new debug options expressed as a string. More...
 
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 parameter. More...
 
static bool unset_debug_options (const std::string &debug_options)
 Reduce the current set of debug options by disabling the debug options expressed as a string. More...
 

Static Private Attributes

static std::atomic< std::int64_t > m_debug_options {GCS_DEBUG_NONE}
 The debug level enabled which is by default GCS_DEBUG_NONE;. More...
 
static const std::string m_debug_none
 String that represents the GCS_DEBUG_NONE;. More...
 
static const std::string m_debug_all
 String that represents the GCS_DEBUG_ALL;. More...
 

Member Function Documentation

◆ force_debug_options() [1/2]

bool Gcs_debug_options::force_debug_options ( const int64_t  debug_options)
static

Change the current set of debug options by the new debug options expressed as an integer parameter.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be defined
Return values
falseif success, true otherwise.

◆ force_debug_options() [2/2]

bool Gcs_debug_options::force_debug_options ( const std::string &  debug_options)
static

Changed the current set of debug options by the new debug options expressed as a string.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be defined
Return values
falseif success, true otherwise.

◆ get_current_debug_options() [1/2]

int64_t Gcs_debug_options::get_current_debug_options ( )
static

Get the current set of debug options.

◆ get_current_debug_options() [2/2]

int64_t Gcs_debug_options::get_current_debug_options ( std::string &  res_debug_options)
static

Get the current set of debug options as an integer value and as a string separated by comma.

Parameters
[out]res_debug_optionsString containing the result

◆ get_debug_options() [1/2]

bool Gcs_debug_options::get_debug_options ( const int64_t  debug_options,
std::string &  res_debug_options 
)
static

Get the set of debug options passed as parameter as a string.

If there is any invalid debug option in the debug_options parameter, true is returned.

Parameters
[in]debug_optionsSet of debug options
[out]res_debug_optionsString that contains the result
Return values
falseif success, true otherwise.

◆ get_debug_options() [2/2]

bool Gcs_debug_options::get_debug_options ( const std::string &  debug_options,
int64_t &  res_debug_options 
)
static

Get the set of debug options passed as parameter as an unsigned integer.

If there is any invalid debug option in the debug_options parameter, true is returned.

Parameters
[in]debug_optionsSet of debug options
[out]res_debug_optionsUnsigned integer that contains the result
Return values
falseif success, true otherwise.

◆ get_number_debug_options()

unsigned int Gcs_debug_options::get_number_debug_options ( )
static

Get the the number of possible debug options.

◆ get_valid_debug_options()

int64_t Gcs_debug_options::get_valid_debug_options ( )
static

Get the set of valid debug options excluding GCS_DEBUG_NONE and GCS_DEBUG_ALL.

◆ is_valid_debug_options() [1/2]

bool Gcs_debug_options::is_valid_debug_options ( const int64_t  debug_options)
static

Check whether the set of debug options is valid or not including GCS_DEBUG_NONE and GCS_DEBUG_ALL.

Parameters
[in]debug_optionsSet of debug options
Return values
trueif success, false otherwise

◆ is_valid_debug_options() [2/2]

bool Gcs_debug_options::is_valid_debug_options ( const std::string &  debug_options)
static

Check whether the set of debug options is valid or not including GCS_DEBUG_NONE and GCS_DEBUG_ALL.

Parameters
[in]debug_optionsSet of debug options
Return values
falseif success, true otherwise.

◆ load_debug_options()

static int64_t Gcs_debug_options::load_debug_options ( )
inlinestatic

Atomically load information on debug options.

◆ set_debug_options() [1/2]

bool Gcs_debug_options::set_debug_options ( const int64_t  debug_options)
static

Extend the current set of debug options with new debug options expressed as an integer parameter.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be added
Return values
falseif success, true otherwise.

◆ set_debug_options() [2/2]

bool Gcs_debug_options::set_debug_options ( const std::string &  debug_options)
static

Extend the current set of debug options with new debug options expressed as a string.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be added
Return values
falseif success, true otherwise.

◆ store_debug_options()

static void Gcs_debug_options::store_debug_options ( int64_t  debug_options)
inlinestatic

Atomically store information on debug options.

◆ test_debug_options()

static bool Gcs_debug_options::test_debug_options ( const int64_t  debug_options)
inlinestatic

Verify whether any of the debug options are defined.

Parameters
debug_optionsSet of debug options to be verified.
Return values
trueif it is, false otherwise.

◆ unset_debug_options() [1/2]

bool Gcs_debug_options::unset_debug_options ( const int64_t  debug_options)
static

Reduce the current set of debug options by disabling the debug options expressed as an integer parameter.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be disabled
Return values
falseif success, true otherwise.

◆ unset_debug_options() [2/2]

bool Gcs_debug_options::unset_debug_options ( const std::string &  debug_options)
static

Reduce the current set of debug options by disabling the debug options expressed as a string.

If there is any invalid debug option in the debug_options parameter, true is returned and nothing is changed.

Parameters
[in]debug_optionsSet of debug options to be disabled
Return values
falseif success, true otherwise.

Member Data Documentation

◆ m_debug_all

const std::string Gcs_debug_options::m_debug_all
staticprivate

String that represents the GCS_DEBUG_ALL;.

◆ m_debug_none

const std::string Gcs_debug_options::m_debug_none
staticprivate

String that represents the GCS_DEBUG_NONE;.

◆ m_debug_options

std::atomic< std::int64_t > Gcs_debug_options::m_debug_options {GCS_DEBUG_NONE}
staticprivate

The debug level enabled which is by default GCS_DEBUG_NONE;.


The documentation for this class was generated from the following files: