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
46 <dt>NOTICE</dt><dd>Arbitrary unimportant notice. Message which normally should be disabled
47 but might be informative to better understand the programs operation.</dd>
49 <dt>MESSAGE</dt><dd>Purely informative message which should be displayed if not explicitly
52 <dt>IMPORTANT</dt><dd>Important information or warning which really should be read.</dd>
54 <dt>CRITICAL</dt><dd>Error condition which does not terminate the program completely but has
55 non-reversible adverse effects</dd>
57 <dt>FATAL</dt><dd>Error condition which does terminate program execution or enforces a
58 restart or some kind of re-initialization with loss of state and context.</dd></dl>
60 There are also some special values which <em>must not be used as a %log level</em>:
62 <dl><dt>DISABLED</dt><dd>Disable all %log messages.</dd>
64 <dt>NONE</dt><dd>Special value which signifies inheritance of the default %log
67 Log levels are classes, not numbers. Each %log level class has a \c value member which gives
68 that levels numeric priority. The larger the number, the more important the message is.
70 \implementation The %log levels need to be classes since areas and streams are classes: Since
71 %log arguments (stream, area and level) may appear in any order and number, it is much
72 simpler to parse them if they are all of the same type.
77 /** \brief Log level VERBOSE
79 struct VERBOSE : public detail::LevelBase { static unsigned const value = 1; };
81 /** \brief Log level NOTICE
83 struct NOTICE : public detail::LevelBase { static unsigned const value = 2; };
85 /** \brief Log level MESSAGE
87 struct MESSAGE : public detail::LevelBase { static unsigned const value = 3; };
89 /** \brief Log level IMPORTANT
91 struct IMPORTANT : public detail::LevelBase { static unsigned const value = 4; };
93 /** \brief Log level CRITICAL
95 struct CRITICAL : public detail::LevelBase { static unsigned const value = 5; };
97 /** \brief Log level FATAL
99 struct FATAL : public detail::LevelBase { static unsigned const value = 6; };
101 /** \brief Disable logging
103 struct DISABLED : public detail::LevelBase { static unsigned const value = 7; };
105 /** \brief Inherit log level
107 struct NONE : public detail::LevelBase { static unsigned const value = 0; };
113 ///////////////////////////////hh.e////////////////////////////////////////
114 //#include "Levels.cci"
115 //#include "Levels.ct"
116 //#include "Levels.cti"
123 // comment-column: 40
124 // c-file-style: "senf"
125 // indent-tabs-mode: nil
126 // ispell-local-dictionary: "american"
127 // compile-command: "scons -u test"