AnCH Framework  0.1
Another C++ Hack Framework
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
levels.hpp
1 /*
2  ANCH Framework: ANother C++ Hack is a C++ framework based on C++11 standard
3  Copyright (C) 2012 Vincent Lachenal
4 
5  This file is part of ANCH Framework.
6 
7  ANCH Framework is free software: you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  ANCH Framework is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with ANCH Framework. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef _ANCH_LOGGER_LEVEL_H_
21 #define _ANCH_LOGGER_LEVEL_H_
22 
23 #include <iostream>
24 #include <map>
25 
26 namespace anch {
27  namespace logger {
28 
34  enum Level {
36  TRACE = 0,
37 
39  DEBUG = 10,
40 
42  INFO = 20,
43 
45  WARN = 30,
46 
48  ERROR = 40,
49 
51  FATAL = 50
52  };
53 
59  const std::map<const Level,const std::string> LEVEL_LABEL = {
60  {Level::TRACE,"TRACE"},
61  {Level::DEBUG,"DEBUG"},
62  {Level::INFO,"INFO"},
63  {Level::WARN,"WARN"},
64  {Level::ERROR,"ERROR"},
65  {Level::FATAL,"FATAL"},
66  };
67 
73  const std::map<const std::string,const Level> LABEL_LEVEL = {
74  {"TRACE",Level::TRACE},
75  {"DEBUG",Level::DEBUG},
76  {"INFO",Level::INFO},
77  {"WARN",Level::WARN},
78  {"ERROR",Level::ERROR},
79  {"FATAL",Level::FATAL},
80  };
81 
82  }
83 }
84 
85 #endif // _ANCH_LOGGER_LEVEL_H_
const std::map< const std::string, const Level > LABEL_LEVEL
Definition: levels.hpp:73
Definition: levels.hpp:51
const std::map< const Level, const std::string > LEVEL_LABEL
Definition: levels.hpp:59
AnCH framework base namespace.
Definition: base64.hpp:28
Definition: levels.hpp:45
Definition: levels.hpp:42
Level
Definition: levels.hpp:34
Definition: levels.hpp:39
Definition: levels.hpp:48
Definition: levels.hpp:36