pacemaker  2.1.6-802a72226b
Scalable High-Availability cluster resource manager
Macros | Functions
logging_internal.h File Reference
#include <glib.h>
#include <crm/common/logging.h>
#include <crm/common/output_internal.h>
Include dependency graph for logging_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCMK__LOGGING_INTERNAL_H
 
#define pcmk__config_err(fmt...)
 
#define pcmk__config_warn(fmt...)
 
#define pcmk__if_tracing(if_action, else_action)
 

Functions

void pcmk__cli_init_logging (const char *name, unsigned int verbosity)
 
int pcmk__add_logfile (const char *filename)
 Add a file to be used as a Pacemaker detail log. More...
 
void pcmk__add_logfiles (gchar **log_files, pcmk__output_t *out)
 Add multiple additional log files. More...
 
void pcmk__free_common_logger (void)
 

Macro Definition Documentation

◆ pcmk__config_err

#define pcmk__config_err (   fmt...)
Value:
do { \
crm_config_error = TRUE; \
crm_err(fmt); \
} while (0)

Definition at line 29 of file logging_internal.h.

◆ pcmk__config_warn

#define pcmk__config_warn (   fmt...)
Value:
do { \
crm_config_warning = TRUE; \
crm_warn(fmt); \
} while (0)

Definition at line 41 of file logging_internal.h.

◆ pcmk__if_tracing

#define pcmk__if_tracing (   if_action,
  else_action 
)
Value:
do { \
static struct qb_log_callsite *trace_cs = NULL; \
\
if (trace_cs == NULL) { \
trace_cs = qb_log_callsite_get(__func__, __FILE__, \
"if_tracing", LOG_TRACE, \
__LINE__, crm_trace_nonlog); \
} \
if_action; \
} else { \
else_action; \
} \
} while (0)
#define LOG_TRACE
Definition: logging.h:37
unsigned int crm_trace_nonlog
Definition: logging.c:46
gboolean crm_is_callsite_active(struct qb_log_callsite *cs, uint8_t level, uint32_t tags)
Definition: logging.c:661

Definition at line 59 of file logging_internal.h.

◆ PCMK__LOGGING_INTERNAL_H

#define PCMK__LOGGING_INTERNAL_H

Definition at line 15 of file logging_internal.h.

Function Documentation

◆ pcmk__add_logfile()

int pcmk__add_logfile ( const char *  filename)

Add a file to be used as a Pacemaker detail log.

Parameters
[in]filenameName of log file to use
Returns
Standard Pacemaker return code

Definition at line 312 of file logging.c.

◆ pcmk__add_logfiles()

void pcmk__add_logfiles ( gchar **  log_files,
pcmk__output_t out 
)

Add multiple additional log files.

Parameters
[in]log_filesArray of log files to add
[in]outOutput object to use for error reporting
Returns
Standard Pacemaker return code

Definition at line 396 of file logging.c.

◆ pcmk__cli_init_logging()

void pcmk__cli_init_logging ( const char *  name,
unsigned int  verbosity 
)

Definition at line 1117 of file logging.c.

◆ pcmk__free_common_logger()

void pcmk__free_common_logger ( void  )

Definition at line 1164 of file logging.c.