pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
logging.c File Reference
#include <crm_internal.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#include <libgen.h>
#include <signal.h>
#include <bzlib.h>
#include <qb/qbdefs.h>
#include <crm/crm.h>
#include <crm/common/mainloop.h>
Include dependency graph for logging.c:

Go to the source code of this file.

Macros

#define NAME_MAX   256
 
#define FMT_MAX   256
 
#define ARGS_FMT   "Invoked: %s"
 

Functions

const char * daemon_option (const char *option)
 
void set_daemon_option (const char *option, const char *value)
 
gboolean daemon_option_enabled (const char *daemon, const char *option)
 
void crm_log_deinit (void)
 
gboolean crm_add_logfile (const char *filename)
 
void crm_enable_blackbox (int nsig)
 
void crm_disable_blackbox (int nsig)
 
void crm_write_blackbox (int nsig, struct qb_log_callsite *cs)
 
gboolean crm_log_cli_init (const char *entity)
 
gboolean crm_is_callsite_active (struct qb_log_callsite *cs, uint8_t level, uint32_t tags)
 
void crm_update_callsites (void)
 
void crm_log_preinit (const char *entity, int argc, char **argv)
 
gboolean crm_log_init (const char *entity, uint8_t level, gboolean daemon, gboolean to_stderr, int argc, char **argv, gboolean quiet)
 
unsigned int set_crm_log_level (unsigned int level)
 
void crm_enable_stderr (int enable)
 
void crm_bump_log_level (int argc, char **argv)
 
unsigned int get_crm_log_level (void)
 
void crm_log_args (int argc, char **argv)
 
const char * pcmk_errorname (int rc)
 
const char * pcmk_strerror (int rc)
 
const char * bz2_strerror (int rc)
 
void crm_log_output_fn (const char *file, const char *function, int line, int level, const char *prefix, const char *output)
 
char * crm_strdup_printf (char const *format,...)
 

Variables

unsigned int crm_log_priority = LOG_NOTICE
 
unsigned int crm_log_level = LOG_INFO
 
unsigned int crm_trace_nonlog = 0
 
bool crm_is_daemon = 0
 

Macro Definition Documentation

#define ARGS_FMT   "Invoked: %s"

Definition at line 947 of file logging.c.

#define FMT_MAX   256

Definition at line 187 of file logging.c.

#define NAME_MAX   256

Definition at line 103 of file logging.c.

Function Documentation

const char* bz2_strerror ( int  rc)

Definition at line 1198 of file logging.c.

gboolean crm_add_logfile ( const char *  filename)

Definition at line 222 of file logging.c.

void crm_bump_log_level ( int  argc,
char **  argv 
)

Definition at line 924 of file logging.c.

void crm_disable_blackbox ( int  nsig)

Definition at line 420 of file logging.c.

void crm_enable_blackbox ( int  nsig)

Definition at line 414 of file logging.c.

void crm_enable_stderr ( int  enable)

Definition at line 912 of file logging.c.

gboolean crm_is_callsite_active ( struct qb_log_callsite *  cs,
uint8_t  level,
uint32_t  tags 
)

Definition at line 593 of file logging.c.

void crm_log_args ( int  argc,
char **  argv 
)

Definition at line 949 of file logging.c.

gboolean crm_log_cli_init ( const char *  entity)

Definition at line 483 of file logging.c.

void crm_log_deinit ( void  )

Definition at line 180 of file logging.c.

gboolean crm_log_init ( const char *  entity,
uint8_t  level,
gboolean  daemon,
gboolean  to_stderr,
int  argc,
char **  argv,
gboolean  quiet 
)

Definition at line 758 of file logging.c.

void crm_log_output_fn ( const char *  file,
const char *  function,
int  line,
int  level,
const char *  prefix,
const char *  output 
)

Definition at line 1231 of file logging.c.

void crm_log_preinit ( const char *  entity,
int  argc,
char **  argv 
)

Definition at line 708 of file logging.c.

char* crm_strdup_printf ( char const *  format,
  ... 
)

Definition at line 1256 of file logging.c.

void crm_update_callsites ( void  )

Definition at line 622 of file logging.c.

void crm_write_blackbox ( int  nsig,
struct qb_log_callsite *  cs 
)

Definition at line 426 of file logging.c.

const char* daemon_option ( const char *  option)

Definition at line 117 of file logging.c.

gboolean daemon_option_enabled ( const char *  daemon,
const char *  option 
)

Definition at line 165 of file logging.c.

unsigned int get_crm_log_level ( void  )

Definition at line 942 of file logging.c.

const char* pcmk_errorname ( int  rc)

Definition at line 981 of file logging.c.

const char* pcmk_strerror ( int  rc)

Definition at line 1135 of file logging.c.

unsigned int set_crm_log_level ( unsigned int  level)

Definition at line 901 of file logging.c.

void set_daemon_option ( const char *  option,
const char *  value 
)

Definition at line 141 of file logging.c.

Variable Documentation

bool crm_is_daemon = 0

Definition at line 49 of file logging.c.

unsigned int crm_log_level = LOG_INFO

Definition at line 46 of file logging.c.

unsigned int crm_log_priority = LOG_NOTICE

Definition at line 45 of file logging.c.

unsigned int crm_trace_nonlog = 0

Definition at line 48 of file logging.c.