PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | SGR_ERROR_DEFAULT "01;31" |
#define | SGR_WARNING_DEFAULT "01;35" |
#define | SGR_NOTE_DEFAULT "01;36" |
#define | SGR_LOCUS_DEFAULT "01" |
#define | ANSI_ESCAPE_FMT "\x1b[%sm" |
#define | ANSI_ESCAPE_RESET "\x1b[0m" |
Functions | |
void | pg_logging_init (const char *argv0) |
void | pg_logging_config (int new_flags) |
void | pg_logging_set_level (enum pg_log_level new_level) |
void | pg_logging_increase_verbosity (void) |
void | pg_logging_set_pre_callback (void(*cb)(void)) |
void | pg_logging_set_locus_callback (void(*cb)(const char **filename, uint64 *lineno)) |
void | pg_log_generic (enum pg_log_level level, enum pg_log_part part, const char *pg_restrict fmt,...) |
void | pg_log_generic_v (enum pg_log_level level, enum pg_log_part part, const char *pg_restrict fmt, va_list ap) |
Variables | |
enum pg_log_level | __pg_log_level |
static const char * | progname |
static int | log_flags |
static void(* | log_pre_callback )(void) |
static void(* | log_locus_callback )(const char **, uint64 *) |
static const char * | sgr_error = NULL |
static const char * | sgr_warning = NULL |
static const char * | sgr_note = NULL |
static const char * | sgr_locus = NULL |
void pg_log_generic | ( | enum pg_log_level | level, |
enum pg_log_part | part, | ||
const char *pg_restrict | fmt, | ||
... | |||
) |
Definition at line 208 of file logging.c.
References fmt, pg_log_generic_v(), va_end(), and va_start().
Referenced by get_dirent_type().
void pg_log_generic_v | ( | enum pg_log_level | level, |
enum pg_log_part | part, | ||
const char *pg_restrict | fmt, | ||
va_list | ap | ||
) |
Definition at line 219 of file logging.c.
References _, __pg_log_level, ANSI_ESCAPE_FMT, ANSI_ESCAPE_RESET, Assert, buf, fflush(), filename, fmt, fprintf, free, log_flags, log_locus_callback, log_pre_callback, MCXT_ALLOC_NO_OOM, PG_LOG_DETAIL, PG_LOG_ERROR, PG_LOG_FLAG_TERSE, PG_LOG_HINT, PG_LOG_PRIMARY, PG_LOG_WARNING, pg_malloc_extended(), progname, sgr_error, sgr_locus, sgr_note, sgr_warning, generate_unaccent_rules::stdout, UINT64_FORMAT, va_end(), vfprintf(), and vsnprintf.
Referenced by pg_log_generic(), report_backup_error(), report_fatal_error(), report_manifest_error(), walsummary_error_callback(), and warn_or_exit_horribly().
void pg_logging_config | ( | int | new_flags | ) |
void pg_logging_increase_verbosity | ( | void | ) |
Definition at line 185 of file logging.c.
References __pg_log_level, and PG_LOG_NOTSET.
Referenced by main().
void pg_logging_init | ( | const char * | argv0 | ) |
Definition at line 83 of file logging.c.
References __pg_log_level, argv0, free, get_progname(), name, PG_LOG_INFO, progname, sgr_error, SGR_ERROR_DEFAULT, sgr_locus, SGR_LOCUS_DEFAULT, sgr_note, SGR_NOTE_DEFAULT, sgr_warning, SGR_WARNING_DEFAULT, strsep(), token, and value.
Referenced by get_opts(), main(), and regression_main().
void pg_logging_set_level | ( | enum pg_log_level | new_level | ) |
void pg_logging_set_locus_callback | ( | void(*)(const char **filename, uint64 *lineno) | cb | ) |
void pg_logging_set_pre_callback | ( | void(*)(void) | cb | ) |
enum pg_log_level __pg_log_level |
Definition at line 1 of file logging.c.
Referenced by executeMetaCommand(), pg_log_generic_v(), pg_logging_increase_verbosity(), pg_logging_init(), and pg_logging_set_level().
|
static |
Definition at line 24 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_config().
|
static |
Definition at line 27 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_set_locus_callback().
|
static |
Definition at line 26 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_set_pre_callback().
|
static |
Definition at line 23 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_init().
|
static |
Definition at line 29 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_init().
|
static |
Definition at line 32 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_init().
|
static |
Definition at line 31 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_init().
|
static |
Definition at line 30 of file logging.c.
Referenced by pg_log_generic_v(), and pg_logging_init().