diff options
Diffstat (limited to 'src/common/log.h')
-rw-r--r-- | src/common/log.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/log.h b/src/common/log.h index cd107fcfd6..5f900d320e 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -2,16 +2,34 @@ /* See LICENSE for licensing information */ /* $Id$ */ +/** + * /file log.h + * + * /brief Headers for logging functions. + **/ + #ifndef __LOG_H #ifdef HAVE_SYSLOG_H #include <syslog.h> #define LOG_WARN LOG_WARNING #else +/** Debug-level severity: for hyper-verbose messages of no interest to + * anybody but developers. */ #define LOG_DEBUG 0 +/** Info-level severity: for messages that appear frequently during normal + * operation. */ #define LOG_INFO 1 +/** Notice-level severity: for messages that appear infrequently + * during normal operation; that the user will probably care about; + * and that are not errors. + */ #define LOG_NOTICE 2 +/** Warn-level severity: for messages that only appear when something has gone + * wrong. */ #define LOG_WARN 3 +/** Warn-level severity: for messages that only appear when something has gone + * very wrong, and the Tor process can no longer proceed. */ #define LOG_ERR 4 #endif @@ -34,6 +52,8 @@ void _log(int severity, const char *format, ...) CHECK_PRINTF(2,3); #ifdef __GNUC__ void _log_fn(int severity, const char *funcname, const char *format, ...) CHECK_PRINTF(3,4); +/** Log a message at level <b>severity</b>, using a pretty-printed version + * of the current function name. */ #define log_fn(severity, args...) \ _log_fn(severity, __PRETTY_FUNCTION__, args) #else |