Go to the source code of this file.
|
enum | pcmk__warnings {
pcmk__wo_blind = (1 << 0),
pcmk__wo_restart_type = (1 << 1),
pcmk__wo_role_after = (1 << 2),
pcmk__wo_poweroff = (1 << 3),
pcmk__wo_require_all = (1 << 4),
pcmk__wo_order_score = (1 << 5),
pcmk__wo_neg_threshold = (1 << 6),
pcmk__wo_remove_after = (1 << 7),
pcmk__wo_ping_node = (1 << 8),
pcmk__wo_order_inst = (1 << 9),
pcmk__wo_coloc_inst = (1 << 10),
pcmk__wo_group_order = (1 << 11),
pcmk__wo_group_coloc = (1 << 12),
pcmk__wo_upstart = (1 << 13),
pcmk__wo_nagios = (1 << 14),
pcmk__wo_set_ordering = (1 << 15),
pcmk__wo_rdisc_enabled = (1 << 16),
pcmk__wo_rkt = (1 << 17),
pcmk__wo_location_rules = (1 << 18),
pcmk__wo_op_attr_expr = (1 << 19),
pcmk__wo_instance_defaults = (1 << 20),
pcmk__wo_multiple_rules = (1 << 21),
pcmk__wo_master_element = (1 << 22),
pcmk__wo_clone_master_max = (1 << 23),
pcmk__wo_clone_master_node_max = (1 << 24),
pcmk__wo_bundle_master = (1 << 25),
pcmk__wo_master_role = (1 << 26),
pcmk__wo_slave_role = (1 << 27)
} |
|
|
void | pcmk__set_config_error_handler (pcmk__config_error_func error_handler, void *error_context) |
|
void | pcmk__set_config_warning_handler (pcmk__config_warning_func warning_handler, void *warning_context) |
|
void | pcmk__log_xml_changes_as (const char *file, const char *function, uint32_t line, uint32_t tags, uint8_t level, const xmlNode *xml) |
|
void | pcmk__log_xml_patchset_as (const char *file, const char *function, uint32_t line, uint32_t tags, uint8_t level, const xmlNode *patchset) |
|
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) |
|
◆ pcmk__config_err
#define pcmk__config_err |
( |
|
fmt... | ) |
|
Value:do { \
crm_config_error = TRUE; \
crm_err(fmt); \
} else { \
} \
} while (0)
void * pcmk__config_error_context
void(*) typedef void(*) pcmk__config_error_fun pcmk__config_error_handler)
Definition at line 100 of file logging_internal.h.
◆ pcmk__config_warn
#define pcmk__config_warn |
( |
|
fmt... | ) |
|
Value:do { \
crm_config_warning = TRUE; \
crm_warn(fmt); \
} else { \
} \
} while (0)
pcmk__config_warning_func pcmk__config_warning_handler
void * pcmk__config_warning_context
Definition at line 115 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_action; \
} else { \
else_action; \
} \
} while (0)
unsigned int crm_trace_nonlog
gboolean crm_is_callsite_active(struct qb_log_callsite *cs, uint8_t level, uint32_t tags)
Definition at line 137 of file logging_internal.h.
◆ pcmk__log_xml_changes
#define pcmk__log_xml_changes |
( |
|
level, |
|
|
|
xml |
|
) |
| |
Value:do { \
uint8_t _level = pcmk__clip_log_level(level); \
static struct qb_log_callsite *xml_cs = NULL; \
\
switch (_level) { \
break; \
default: \
if (xml_cs == NULL) { \
xml_cs = qb_log_callsite_get(__func__, __FILE__, \
"xml-changes", _level, \
__LINE__, 0); \
} \
pcmk__log_xml_changes_as(__FILE__, __func__, __LINE__, \
0, _level, xml); \
} \
break; \
} \
} while(0)
gboolean crm_is_callsite_active(struct qb_log_callsite *cs, uint8_t level, uint32_t tags)
Definition at line 162 of file logging_internal.h.
◆ pcmk__log_xml_patchset
#define pcmk__log_xml_patchset |
( |
|
level, |
|
|
|
patchset |
|
) |
| |
Value:do { \
uint8_t _level = pcmk__clip_log_level(level); \
static struct qb_log_callsite *xml_cs = NULL; \
\
switch (_level) { \
break; \
default: \
if (xml_cs == NULL) { \
xml_cs = qb_log_callsite_get(__func__, __FILE__, \
"xml-patchset", _level, \
__LINE__, 0); \
} \
pcmk__log_xml_patchset_as(__FILE__, __func__, __LINE__, \
0, _level, patchset); \
} \
break; \
} \
} while(0)
gboolean crm_is_callsite_active(struct qb_log_callsite *cs, uint8_t level, uint32_t tags)
Definition at line 193 of file logging_internal.h.
◆ PCMK__LOGGING_INTERNAL_H
#define PCMK__LOGGING_INTERNAL_H |
◆ pcmk__warn_once
#define pcmk__warn_once |
( |
|
wo_flag, |
|
|
|
fmt... |
|
) |
| |
Value:do { \
crm_warn(fmt); \
} else { \
pcmk__config_warn(fmt); \
} \
pcmk__warnings = pcmk__set_flags_as(__func__, __LINE__, \
"Warn-once", "logging", \
(wo_flag), #wo_flag); \
} \
} while (0)
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
Definition at line 65 of file logging_internal.h.
◆ pcmk__config_error_func
typedef void(* pcmk__config_error_func) (void *ctx, const char *msg,...) G_GNUC_PRINTF(2 |
◆ pcmk__config_error_handler
typedef void(*) typedef void(*) pcmk__config_error_fun pcmk__config_error_handler) |
◆ pcmk__config_warning_func
typedef void(*) typedef void(* pcmk__config_warning_func) (void *ctx, const char *msg,...) G_GNUC_PRINTF(2 |
◆ pcmk__warnings
Enumerator |
---|
pcmk__wo_blind | |
pcmk__wo_restart_type | |
pcmk__wo_role_after | |
pcmk__wo_poweroff | |
pcmk__wo_require_all | |
pcmk__wo_order_score | |
pcmk__wo_neg_threshold | |
pcmk__wo_remove_after | |
pcmk__wo_ping_node | |
pcmk__wo_order_inst | |
pcmk__wo_coloc_inst | |
pcmk__wo_group_order | |
pcmk__wo_group_coloc | |
pcmk__wo_upstart | |
pcmk__wo_nagios | |
pcmk__wo_set_ordering | |
pcmk__wo_rdisc_enabled | |
pcmk__wo_rkt | |
pcmk__wo_location_rules | |
pcmk__wo_op_attr_expr | |
pcmk__wo_instance_defaults | |
pcmk__wo_multiple_rules | |
pcmk__wo_master_element | |
pcmk__wo_clone_master_max | |
pcmk__wo_clone_master_node_max | |
pcmk__wo_bundle_master | |
pcmk__wo_master_role | |
pcmk__wo_slave_role | |
Definition at line 27 of file logging_internal.h.
◆ pcmk__add_logfile()
int pcmk__add_logfile |
( |
const char * |
filename | ) |
|
Add a file to be used as a Pacemaker detail log.
- Parameters
-
[in] | filename | Name of log file to use |
- Returns
- Standard Pacemaker return code
Definition at line 317 of file logging.c.
◆ pcmk__add_logfiles()
Add multiple additional log files.
- Parameters
-
[in] | log_files | Array of log files to add |
[in] | out | Output object to use for error reporting |
- Returns
- Standard Pacemaker return code
Definition at line 401 of file logging.c.
◆ pcmk__cli_init_logging()
void pcmk__cli_init_logging |
( |
const char * |
name, |
|
|
unsigned int |
verbosity |
|
) |
| |
◆ pcmk__free_common_logger()
void pcmk__free_common_logger |
( |
void |
| ) |
|
◆ pcmk__log_xml_changes_as()
void pcmk__log_xml_changes_as |
( |
const char * |
file, |
|
|
const char * |
function, |
|
|
uint32_t |
line, |
|
|
uint32_t |
tags, |
|
|
uint8_t |
level, |
|
|
const xmlNode * |
xml |
|
) |
| |
◆ pcmk__log_xml_patchset_as()
void pcmk__log_xml_patchset_as |
( |
const char * |
file, |
|
|
const char * |
function, |
|
|
uint32_t |
line, |
|
|
uint32_t |
tags, |
|
|
uint8_t |
level, |
|
|
const xmlNode * |
patchset |
|
) |
| |
◆ pcmk__set_config_error_handler()
◆ pcmk__set_config_warning_handler()
◆ pcmk__config_error_context
void* pcmk__config_error_context |
◆ pcmk__config_warning_context
void* pcmk__config_warning_context |
◆ pcmk__config_warning_handler