X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FLevels.hh;h=9051f9f3c22f46d11642da55dff3454a31561f08;hb=28275a1a9075ae42dc29aaadc5bc78e6fa204e26;hp=76168437f867e98946ea736241f710aac107fb1c;hpb=61419d9a2e1060f7ede22fa19fd9d0b401bbc87a;p=senf.git
diff --git a/Utils/Logger/Levels.hh b/Utils/Logger/Levels.hh
index 7616843..9051f9f 100644
--- a/Utils/Logger/Levels.hh
+++ b/Utils/Logger/Levels.hh
@@ -39,9 +39,37 @@ namespace log {
These are the valid log levels with some additional special values:
- \c DISABLED is a special value used as level limit to disable all messages.
+
- VERBOSE
- Really verbose log messages. Messages at this level are used for
+ internal debugging. They should be enabled only selectively within the areas currently under
+ inspection.
- \c NONE is used to in some special places to inherit the default log level.
+ - NOTICE
- Arbitrary unimportant notice. Message which normally should be disabled
+ but might be informative to better understand the programs operation.
+
+ - MESSAGE
- Purely informative message which should be displayed if not explicitly
+ disabled.
+
+ - IMPORTANT
- Important information or warning which really should be read.
+
+ - CRITICAL
- Error condition which does not terminate the program completely but has
+ non-reversible adverse effects
+
+ - FATAL
- Error condition which does terminate program execution or enforces a
+ restart or some kind of re-initialization with loss of state and context.
+
+ There are also some special values which must not be used as a log level:
+
+ - DISABLED
- Disable all log messages.
+
+ - NONE
- Special value which signifies inheritance of the default log
+ level.
+
+ Log levels are classes, not numbers. Each log level class has a \c value member which gives
+ that levels numeric priority. The larger the number, the more important the message is.
+
+ \implementation The log levels need to be classes since areas and streams are classes: Since
+ log arguments (stream, area and level) may appear in any order and number, it is much
+ simpler to parse them if they are all of the same type.
*/
///\ingroup loglevels
@@ -67,9 +95,13 @@ namespace log {
\see loglevels */
struct CRITICAL : public detail::LevelBase { static unsigned const value = 5; };
+ /** \brief Log level FATAL
+ \see loglevels */
+ struct FATAL : public detail::LevelBase { static unsigned const value = 6; };
+
/** \brief Disable logging
\see loglevels */
- struct DISABLED : public detail::LevelBase { static unsigned const value = 6; };
+ struct DISABLED : public detail::LevelBase { static unsigned const value = 7; };
/** \brief Inherit log level
\see loglevels */