diff options
author | Martin Willi <martin@strongswan.org> | 2005-12-07 07:57:18 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-12-07 07:57:18 +0000 |
commit | aee3eb529999805eac9d3edba47ca46df7946306 (patch) | |
tree | 9d048c516ff3e2fad9cc068e582e5a807490d6d6 /Source/charon/utils | |
parent | a36a745a1891b6d288e94211c76059a2be25d9e0 (diff) | |
download | strongswan-aee3eb529999805eac9d3edba47ca46df7946306.tar.bz2 strongswan-aee3eb529999805eac9d3edba47ca46df7946306.tar.xz |
../svn-commit.tmp
Diffstat (limited to 'Source/charon/utils')
-rw-r--r-- | Source/charon/utils/logger.c | 6 | ||||
-rw-r--r-- | Source/charon/utils/logger.h | 26 |
2 files changed, 20 insertions, 12 deletions
diff --git a/Source/charon/utils/logger.c b/Source/charon/utils/logger.c index 1795c282a..b05d4b0ba 100644 --- a/Source/charon/utils/logger.c +++ b/Source/charon/utils/logger.c @@ -102,15 +102,15 @@ static void prepend_prefix(private_logger_t *this, logger_level_t loglevel, char log_type = '-'; } - if (loglevel & (ALL - MOST)) + if (loglevel & (LEVEL3 - LEVEL2)) { log_details = '3'; } - else if (loglevel & (MOST - MORE)) + else if (loglevel & (LEVEL2 - LEVEL1)) { log_details = '2'; } - else if (loglevel & MORE) + else if (loglevel & LEVEL1) { log_details = '1'; } diff --git a/Source/charon/utils/logger.h b/Source/charon/utils/logger.h index a104ca0be..3841955df 100644 --- a/Source/charon/utils/logger.h +++ b/Source/charon/utils/logger.h @@ -53,31 +53,39 @@ enum logger_level_t { */ ERROR = 2, /** + * Logs important for the sysadmin. + */ + AUDIT = 4, + /** * Raw data dumps. */ - RAW = 4, + RAW = 8, /** * Private data dumps. */ - PRIVATE = 8, + PRIVATE = 16, /** - * Use more detailed output for those above. + * Log most important output, can be omitted. + */ + LEVEL0 = 0, + /** + * Log more detailed output. */ - MORE = 16, + LEVEL1 = 32, /** - * Use even more detailed output. + * Log even more detailed output. */ - MOST = MORE + 32, + LEVEL2 = LEVEL1 + 64, /** - * Use full detailed output. + * Use maximum detailed output. */ - ALL = MOST + 64, + LEVEL3 = LEVEL2 + 128, /** * Summary for all types with all detail-levels. */ - FULL = ALL + CONTROL + ERROR + RAW + PRIVATE + FULL = LEVEL3 + CONTROL + ERROR + RAW + PRIVATE + AUDIT }; typedef struct logger_t logger_t; |