TrueReality  v0.1.1912
LogLevel.h
Go to the documentation of this file.
1 /*
2 * True Reality Open Source Game and Simulation Engine
3 * Copyright © 2021 Acid Rain Studios LLC
4 *
5 * The Base of this class has been adopted from the Delta3D engine
6 *
7 * This library is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Lesser General Public License as published by the Free
9 * Software Foundation; either version 3.0 of the License, or (at your option)
10 * any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * Class Inspired by the Delta3D Engine
22 * http://delta3dengine.org/
23 *
24 * @author Matthew W. Campbell
25 * @author Erik Johnson
26 * @author David Guthrie
27 * @author Maxim Serebrennik
28 */
29 #pragma once
30 
31 #include <trUtil/Export.h>
32 
33 #include <string>
34 
40 namespace trUtil::Logging
41 {
43  const static std::string LOG_DEBUG_STR("Debug");
44 
46  const static std::string LOG_INFO_STR("Info");
47 
49  const static std::string LOG_WARNING_STR("Warning");
50 
52  const static std::string LOG_ERROR_STR("Error");
53 
55  const static std::string LOG_ALWAYS_STR("Always");
56 
62  enum TR_UTIL_EXPORT LogLevel
63  {
65  LOG_INFO,
67  LOG_ERROR,
68  LOG_ALWAYS
69  };
70 
82  TR_UTIL_EXPORT LogLevel LogLevelFromString(const std::string& levelString);
83 
93  const TR_UTIL_EXPORT std::string& LogLevelToString(LogLevel logLevel);
94 }
LOG_DEBUG
Definition: LogLevel.h:64
static const std::string LOG_ERROR_STR("Error")
String value for ERROR Logging level.
static const std::string LOG_WARNING_STR("Warning")
String value for WARNING Logging level.
static const std::string LOG_DEBUG_STR("Debug")
String value for DEBUG Logging level.
TR_UTIL_EXPORT LogLevel LogLevelFromString(const std::string &levelString)
Logs level from string.
Definition: LogLevel.cpp:32
static const std::string LOG_ALWAYS_STR("Always")
String value for ALWAYS Logging level.
A class that represents date time utility.
LOG_ERROR
Definition: LogLevel.h:64
LOG_WARNING
Definition: LogLevel.h:64
static const std::string LOG_INFO_STR("Info")
String value for INFO Logging level.
LOG_INFO
Definition: LogLevel.h:64
const TR_UTIL_EXPORT std::string & LogLevelToString(LogLevel logLevel)
Logs level to string.
Definition: LogLevel.cpp:61