pacemaker  2.1.6-802a72226b
Scalable High-Availability cluster resource manager
Macros | Enumerations | Functions
logging_compat.h File Reference

Deprecated Pacemaker logging API. More...

#include <glib.h>
#include <libxml/tree.h>
Include dependency graph for logging_compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define do_crm_log_always(level, fmt, args...)
 Log a message using constant priority. More...
 
#define crm_str(x)   (const char *) ((x)? (x) : "<null>")
 

Enumerations

enum  xml_log_options {
  xml_log_option_filtered = 0x0001, xml_log_option_formatted = 0x0002, xml_log_option_text = 0x0004, xml_log_option_full_fledged = 0x0008,
  xml_log_option_diff_plus = 0x0010, xml_log_option_diff_minus = 0x0020, xml_log_option_diff_short = 0x0040, xml_log_option_diff_all = 0x0100,
  xml_log_option_dirty_add = 0x1000, xml_log_option_open = 0x2000, xml_log_option_children = 0x4000, xml_log_option_close = 0x8000
}
 

Functions

gboolean crm_log_cli_init (const char *entity)
 
gboolean crm_add_logfile (const char *filename)
 
void log_data_element (int log_level, const char *file, const char *function, int line, const char *prefix, const xmlNode *data, int depth, int legacy_options)
 

Detailed Description

Deprecated Pacemaker logging API.

Deprecated:
Do not include this header directly. Do not use Pacemaker libraries for general-purpose logging; libqb's logging API is a suitable replacement. The logging APIs in this header, and the header itself, will be removed in a future release.

Definition in file logging_compat.h.

Macro Definition Documentation

◆ crm_str

#define crm_str (   x)    (const char *) ((x)? (x) : "<null>")
Deprecated:
Do not use Pacemaker for general-purpose string handling

Definition at line 68 of file logging_compat.h.

◆ do_crm_log_always

#define do_crm_log_always (   level,
  fmt,
  args... 
)
Value:
do { \
switch (level) { \
case LOG_STDOUT: case LOG_NEVER: \
break; \
default: \
qb_log((level), fmt , ##args); \
break; \
} \
} while (0)
#define LOG_NEVER
Definition: logging.h:47
#define LOG_STDOUT
Definition: logging.h:42

Log a message using constant priority.

Parameters
[in]levelPriority at which to log the message
[in]fmtprintf-style format string literal for message
[in]argsAny arguments needed by format string
Deprecated:
Do not use Pacemaker for general-purpose logging
Note
This is a macro, and level may be evaluated more than once. This does nothing when level is LOG_STDOUT.

Definition at line 57 of file logging_compat.h.

Enumeration Type Documentation

◆ xml_log_options

Deprecated:
This enum will be removed in a future release
Enumerator
xml_log_option_filtered 
xml_log_option_formatted 
xml_log_option_text 
xml_log_option_full_fledged 
xml_log_option_diff_plus 
xml_log_option_diff_minus 
xml_log_option_diff_short 
xml_log_option_diff_all 
xml_log_option_dirty_add 
xml_log_option_open 
xml_log_option_children 
xml_log_option_close 

Definition at line 31 of file logging_compat.h.

Function Documentation

◆ crm_add_logfile()

gboolean crm_add_logfile ( const char *  filename)
Deprecated:
Do not use Pacemaker for general-purpose logging

Definition at line 1186 of file logging.c.

◆ crm_log_cli_init()

gboolean crm_log_cli_init ( const char *  entity)
Deprecated:
Do not use Pacemaker for general-purpose logging

Definition at line 1179 of file logging.c.

◆ log_data_element()

void log_data_element ( int  log_level,
const char *  file,
const char *  function,
int  line,
const char *  prefix,
const xmlNode *  data,
int  depth,
int  legacy_options 
)
Deprecated:
Do not use Pacemaker for general-purpose logging

Definition at line 410 of file xml_display.c.