#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
Go to the source code of this file.
|
bool | dont_mute (unsigned int flags) |
| Check muting filter.
|
|
void | x_msg (const unsigned int flags, const char *format,...) |
|
void | x_msg_va (const unsigned int flags, const char *format, va_list arglist) |
|
static bool | check_debug_level (unsigned int level) |
|
static bool | msg_test (unsigned int flags) |
| Return true if flags represent and enabled, not muted log level.
|
|
◆ dmsg
#define dmsg |
( |
|
flags, |
|
|
|
... |
|
) |
| |
◆ EXIT_FATAL
#define EXIT_FATAL |
( |
|
flags | ) |
do { if ((flags) & M_FATAL) {_exit(1);}} while (false) |
◆ M_CLIENT
◆ M_DEBUG
◆ M_DEBUG_LEVEL
#define M_DEBUG_LEVEL (0x0F) /* debug level mask */ |
◆ M_ERR
◆ M_ERRNO
#define M_ERRNO (1<<8) /* show errno description */ |
◆ M_FATAL
#define M_FATAL (1<<4) /* exit program */ |
◆ M_MSG_VIRT_OUT
#define M_MSG_VIRT_OUT (1<<14) /* output message through msg_status_output callback */ |
◆ M_NOIPREFIX
#define M_NOIPREFIX (1<<17) /* don't print instance prefix */ |
◆ M_NOLF
#define M_NOLF (1<<16) /* don't print new line */ |
◆ M_NOMUTE
#define M_NOMUTE (1<<11) /* don't do mute processing */ |
◆ M_NONFATAL
#define M_NONFATAL (1<<5) /* non-fatal error */ |
◆ M_NOPREFIX
#define M_NOPREFIX (1<<12) /* don't show date/time prefix */ |
◆ M_OPTERR
#define M_OPTERR (1<<15) /* print "Options error:" prefix */ |
◆ M_USAGE
◆ M_USAGE_SMALL
◆ M_WARN
#define M_WARN (1<<6) /* call syslog with LOG_WARNING */ |
◆ msg
#define msg |
( |
|
flags, |
|
|
|
... |
|
) |
| do { if (msg_test(flags)) {x_msg((flags), __VA_ARGS__);} EXIT_FATAL(flags); } while (false) |
◆ check_debug_level()
static bool check_debug_level |
( |
unsigned int |
level | ) |
|
|
inlinestatic |
◆ dont_mute()
bool dont_mute |
( |
unsigned int |
flags | ) |
|
◆ msg_test()
static bool msg_test |
( |
unsigned int |
flags | ) |
|
|
inlinestatic |
◆ x_msg()
void x_msg |
( |
const unsigned int |
flags, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
◆ x_msg_va()
void x_msg_va |
( |
const unsigned int |
flags, |
|
|
const char * |
format, |
|
|
va_list |
arglist |
|
) |
| |
Definition at line 234 of file error.c.
References check_debug_level(), CLEAR, DEBUG_LEVEL_USEC_TIME, dont_mute(), ERR_BUF_SIZE, ERROR_MSICA, ERROR_MSICA_ERRNO, fatal_error_triggered, forked, gc, gc_free(), gc_init(), gc_malloc(), openvpnmsica_thread_data::hInstall, M_DEBUG_LEVEL, M_ERRNO, M_FATAL, M_INFO, M_MSG_VIRT_OUT, M_NOIPREFIX, M_NOLF, M_NONFATAL, M_NOPREFIX, M_OPTERR, M_USAGE_SMALL, M_WARN, machine_readable_output, mock_msg_buf, msg, msg_fp(), msg_get_prefix(), msg_get_virtual_output(), msg_test(), openvpn_errno_maybe_crt(), openvpn_exit(), OPENVPN_EXIT_STATUS_ERROR, openvpn_strerror(), openvpnmsica_thread_data_idx, print_x_debug_level, PRIsLPTSTR, std_redir, suppress_timestamps, SWAP, time_string(), usage_small(), use_syslog, virtual_output_print(), and x_msg_line_num.
Referenced by plugin_vlog(), and x_msg().
◆ x_debug_level
unsigned int x_debug_level |
|
extern |
◆ x_msg_line_num