4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Levels public header */
31 //#include "Levels.mpp"
33 ///////////////////////////////hh.p////////////////////////////////////////
38 /** \defgroup loglevels Log levels
40 These are the valid %log levels with some additional special values:
42 <dl><dt>VERBOSE</dt><dd>Really verbose %log messages. Messages at this level are used for
43 internal debugging. They should be enabled only selectively within the areas currently under
44 inspection. The default %log stream senf::log::Debug has these messages <em>disabled</em> at
45 compile time by default. To enable them, see \ref config.</dd>
47 <dt>NOTICE</dt><dd>Arbitrary unimportant notice. Message which normally should be disabled
48 but might be informative to better understand the programs operation.</dd>
50 <dt>MESSAGE</dt><dd>Purely informative message which should be displayed if not explicitly
53 <dt>IMPORTANT</dt><dd>Important information or warning which really should be read.</dd>
55 <dt>CRITICAL</dt><dd>Error condition which does not terminate the program completely but has
56 non-reversible adverse effects</dd>
58 <dt>FATAL</dt><dd>Error condition which does terminate program execution or enforces a
59 restart or some kind of re-initialization with loss of state and context.</dd></dl>
61 There are also some special values which <em>must not be used as a %log level</em>:
63 <dl><dt>DISABLED</dt><dd>Disable all %log messages.</dd>
65 <dt>NONE</dt><dd>Special value which signifies inheritance of the default %log
68 Log levels are classes, not numbers. Each %log level class has a \c value member which gives
69 that levels numeric priority. The larger the number, the more important the message is.
71 \implementation The %log levels need to be classes since areas and streams are classes: Since
72 %log arguments (stream, area and level) may appear in any order and number, it is much
73 simpler to parse them if they are all of the same type.
78 /** \brief Log level %VERBOSE
80 struct VERBOSE : public detail::LevelBase { static unsigned const value = 1; };
82 /** \brief Log level %NOTICE
84 struct NOTICE : public detail::LevelBase { static unsigned const value = 2; };
86 /** \brief Log level %MESSAGE
88 struct MESSAGE : public detail::LevelBase { static unsigned const value = 3; };
90 /** \brief Log level %IMPORTANT
92 struct IMPORTANT : public detail::LevelBase { static unsigned const value = 4; };
94 /** \brief Log level %CRITICAL
96 struct CRITICAL : public detail::LevelBase { static unsigned const value = 5; };
98 /** \brief Log level %FATAL
100 struct FATAL : public detail::LevelBase { static unsigned const value = 6; };
102 /** \brief Disable logging
104 struct DISABLED : public detail::LevelBase { static unsigned const value = 7; };
106 /** \brief Inherit %log level
108 struct NONE : public detail::LevelBase { static unsigned const value = 0; };
114 ///////////////////////////////hh.e////////////////////////////////////////
115 //#include "Levels.cci"
116 //#include "Levels.ct"
117 //#include "Levels.cti"
124 // comment-column: 40
125 // c-file-style: "senf"
126 // indent-tabs-mode: nil
127 // ispell-local-dictionary: "american"
128 // compile-command: "scons -u test"