PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | PG_LOG_FLAG_TERSE 1 |
#define | pg_log_error(...) pg_log_generic(PG_LOG_ERROR, PG_LOG_PRIMARY, __VA_ARGS__) |
#define | pg_log_error_detail(...) pg_log_generic(PG_LOG_ERROR, PG_LOG_DETAIL, __VA_ARGS__) |
#define | pg_log_error_hint(...) pg_log_generic(PG_LOG_ERROR, PG_LOG_HINT, __VA_ARGS__) |
#define | pg_log_warning(...) pg_log_generic(PG_LOG_WARNING, PG_LOG_PRIMARY, __VA_ARGS__) |
#define | pg_log_warning_detail(...) pg_log_generic(PG_LOG_WARNING, PG_LOG_DETAIL, __VA_ARGS__) |
#define | pg_log_warning_hint(...) pg_log_generic(PG_LOG_WARNING, PG_LOG_HINT, __VA_ARGS__) |
#define | pg_log_info(...) pg_log_generic(PG_LOG_INFO, PG_LOG_PRIMARY, __VA_ARGS__) |
#define | pg_log_info_detail(...) pg_log_generic(PG_LOG_INFO, PG_LOG_DETAIL, __VA_ARGS__) |
#define | pg_log_info_hint(...) pg_log_generic(PG_LOG_INFO, PG_LOG_HINT, __VA_ARGS__) |
#define | pg_log_debug(...) |
#define | pg_log_debug_detail(...) |
#define | pg_log_debug_hint(...) |
#define | pg_fatal(...) |
Enumerations | |
enum | pg_log_level { PG_LOG_NOTSET = 0 , PG_LOG_DEBUG , PG_LOG_INFO , PG_LOG_WARNING , PG_LOG_ERROR , PG_LOG_OFF } |
enum | pg_log_part { PG_LOG_PRIMARY , PG_LOG_DETAIL , PG_LOG_HINT } |
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,...) pg_attribute_printf(3 |
void void | pg_log_generic_v (enum pg_log_level level, enum pg_log_part part, const char *pg_restrict fmt, va_list ap) pg_attribute_printf(3 |
Variables | |
enum pg_log_level | __pg_log_level |
#define pg_fatal | ( | ... | ) |
#define pg_log_debug | ( | ... | ) |
#define pg_log_debug_detail | ( | ... | ) |
#define pg_log_debug_hint | ( | ... | ) |
#define pg_log_error | ( | ... | ) | pg_log_generic(PG_LOG_ERROR, PG_LOG_PRIMARY, __VA_ARGS__) |
#define pg_log_error_detail | ( | ... | ) | pg_log_generic(PG_LOG_ERROR, PG_LOG_DETAIL, __VA_ARGS__) |
#define pg_log_error_hint | ( | ... | ) | pg_log_generic(PG_LOG_ERROR, PG_LOG_HINT, __VA_ARGS__) |
#define pg_log_info | ( | ... | ) | pg_log_generic(PG_LOG_INFO, PG_LOG_PRIMARY, __VA_ARGS__) |
#define pg_log_info_detail | ( | ... | ) | pg_log_generic(PG_LOG_INFO, PG_LOG_DETAIL, __VA_ARGS__) |
#define pg_log_info_hint | ( | ... | ) | pg_log_generic(PG_LOG_INFO, PG_LOG_HINT, __VA_ARGS__) |
#define pg_log_warning | ( | ... | ) | pg_log_generic(PG_LOG_WARNING, PG_LOG_PRIMARY, __VA_ARGS__) |
#define pg_log_warning_detail | ( | ... | ) | pg_log_generic(PG_LOG_WARNING, PG_LOG_DETAIL, __VA_ARGS__) |
#define pg_log_warning_hint | ( | ... | ) | pg_log_generic(PG_LOG_WARNING, PG_LOG_HINT, __VA_ARGS__) |
enum pg_log_level |
enum pg_log_part |
void pg_log_generic | ( | enum pg_log_level | level, |
enum pg_log_part | part, | ||
const char *pg_restrict | fmt, | ||
... | |||
) |
void void pg_log_generic_v | ( | enum pg_log_level | level, |
enum pg_log_part | part, | ||
const char *pg_restrict | fmt, | ||
va_list | ap | ||
) |
void pg_logging_config | ( | int | new_flags | ) |
Definition at line 166 of file logging.c.
References log_flags.
Referenced by main(), and process_file().
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 | ) |
Definition at line 202 of file logging.c.
References log_locus_callback.
Referenced by main().
void pg_logging_set_pre_callback | ( | void(*)(void) | cb | ) |
|
extern |
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().