pacemaker 2.1.5-a3f44794f94
Scalable High-Availability cluster resource manager
logging_compat.h
Go to the documentation of this file.
1/*
2 * Copyright 2004-2022 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU General Public License version 2
7 * or later (GPLv2+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__CRM_COMMON_LOGGING_COMPAT__H
11# define PCMK__CRM_COMMON_LOGGING_COMPAT__H
12
13#include <glib.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
40# define do_crm_log_always(level, fmt, args...) do { \
41 switch (level) { \
42 case LOG_STDOUT: case LOG_NEVER: \
43 break; \
44 default: \
45 qb_log((level), fmt , ##args); \
46 break; \
47 } \
48 } while (0)
49
51#define crm_str(x) (const char *) ((x)? (x) : "<null>")
52
54gboolean crm_log_cli_init(const char *entity);
55
57gboolean crm_add_logfile(const char *filename);
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif // PCMK__CRM_COMMON_LOGGING_COMPAT__H
gboolean crm_add_logfile(const char *filename)
Definition: logging.c:1114
gboolean crm_log_cli_init(const char *entity)
Definition: logging.c:1107