MySQL  8.0.19
Source Code Documentation
task_debug.c File Reference
#include "plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task_debug.h"
#include <assert.h>
#include <stdarg.h>

Functions

static int mystrcat_core_sprintf (char *dest, int size, const char *format, va_list args)
 
char * mystrcat (char *dest, int *size, const char *src)
 Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again. More...
 
char * mystrcat_sprintf (char *dest, int *size, const char *format,...)
 This function allocates a new string where the format string and optional arguments are rendered to. More...
 
void xcom_default_log (const int64_t l, const char *msg)
 Prints the logging messages to the console. More...
 
void xcom_default_debug (const char *format,...)
 Print the logging messages to the console. More...
 
int xcom_default_debug_check (const int64_t debug_options)
 Check whether a debug option was enabled or not. More...
 

Function Documentation

◆ mystrcat()

char* mystrcat ( char *  dest,
int *  size,
const char *  src 
)

Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again.

Parameters
destpointer to last character of destination string
sizepointer to the number of characters currently added to xcom_log_buffer
srcpointer to the string to append to dest
Returns
pointer to the last character of destination string after appending dest, which corresponds to the position of the '\0' character

◆ mystrcat_core_sprintf()

static int mystrcat_core_sprintf ( char *  dest,
int  size,
const char *  format,
va_list  args 
)
static

◆ mystrcat_sprintf()

char* mystrcat_sprintf ( char *  dest,
int *  size,
const char *  format,
  ... 
)

This function allocates a new string where the format string and optional arguments are rendered to.

Finally, it invokes mystr_cat to concatenate the rendered string to the string received in the first parameter.

◆ xcom_default_debug()

void xcom_default_debug ( const char *  format,
  ... 
)

Print the logging messages to the console.

Prints the logging messages to the console.

It is invoked when no debugger callback was set by an upper layer.

◆ xcom_default_debug_check()

int xcom_default_debug_check ( const int64_t  debug_options)

Check whether a debug option was enabled or not.

Check whether a set of debug and trace options are enabled.

◆ xcom_default_log()

void xcom_default_log ( const int64_t  l,
const char *  msg 
)

Prints the logging messages to the console.

It is invoked when no logger callback was set by an upper layer.