diff options
author | Karel Klic <kklic@redhat.com> | 2010-08-19 10:49:08 +0200 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-08-19 10:49:08 +0200 |
commit | b4f45ecb8879154afc5bc01544b8f0cac5a472e2 (patch) | |
tree | 104142f26eb3c8b6bf81617f8e43f754dd2b3490 /lib/utils/logging.h | |
parent | 8bffa57699aa266b4710c56f0a12bec741a7dd5b (diff) | |
download | abrt-b4f45ecb8879154afc5bc01544b8f0cac5a472e2.tar.gz abrt-b4f45ecb8879154afc5bc01544b8f0cac5a472e2.tar.xz abrt-b4f45ecb8879154afc5bc01544b8f0cac5a472e2.zip |
logging.h does not need read_write.h and xfuncs.h -> removing the includes
moved defines to the top of the file
extern variable declarations grouped together
removed declarations of nonexistent functions
Diffstat (limited to 'lib/utils/logging.h')
-rw-r--r-- | lib/utils/logging.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/utils/logging.h b/lib/utils/logging.h index f682feb0..8a038bc7 100644 --- a/lib/utils/logging.h +++ b/lib/utils/logging.h @@ -27,15 +27,19 @@ #include <stdarg.h> #include <sys/syslog.h> -#include "read_write.h" -#include "xfuncs.h" - #ifdef __cplusplus extern "C" { #endif #define NORETURN __attribute__ ((noreturn)) +/* VERB1 log("what you sometimes want to see, even on a production box") */ +#define VERB1 if (g_verbose >= 1) +/* VERB2 log("debug message, not going into insanely small details") */ +#define VERB2 if (g_verbose >= 2) +/* VERB3 log("lots and lots of details") */ +#define VERB3 if (g_verbose >= 3) +/* there is no level > 3 */ enum { LOGMODE_NONE = 0, @@ -50,6 +54,10 @@ extern const char *msg_prefix; extern const char *msg_eol; extern int logmode; extern int xfunc_error_retval; + +/* Verbosity level */ +extern int g_verbose; + void xfunc_die(void) NORETURN; void log_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); /* It's a macro, not function, since it collides with log() from math.h */ @@ -61,21 +69,8 @@ void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (pri /* Reports error message with libc's errno error description attached. */ void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); -void perror_nomsg_and_die(void) NORETURN; -void perror_nomsg(void); -void verror_msg(const char *s, va_list p, const char *strerr); void die_out_of_memory(void) NORETURN; -/* Verbosity level */ -extern int g_verbose; -/* VERB1 log("what you sometimes want to see, even on a production box") */ -#define VERB1 if (g_verbose >= 1) -/* VERB2 log("debug message, not going into insanely small details") */ -#define VERB2 if (g_verbose >= 2) -/* VERB3 log("lots and lots of details") */ -#define VERB3 if (g_verbose >= 3) -/* there is no level > 3 */ - #ifdef __cplusplus } #endif |