LogLevel.h
Go to the documentation of this file.
1 //
3 // © Copyright 2022 SCHUNK Mobile Greifsysteme GmbH, Lauffen/Neckar Germany
4 // © Copyright 2022 FZI Forschungszentrum Informatik, Karlsruhe, Germany
5 //
6 // This file is part of the Schunk SVH Library.
7 //
8 // The Schunk SVH Library is free software: you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or (at your
11 // option) any later version.
12 //
13 // The Schunk SVH Library 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 GNU General
16 // Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License along with
19 // the Schunk SVH Library. If not, see <https://www.gnu.org/licenses/>.
20 //
22 
23 //----------------------------------------------------------------------
30 //----------------------------------------------------------------------
31 
32 #pragma once
33 
34 #include <string>
35 
36 namespace driver_svh {
37 enum class LogLevel
38 {
39  DEBUG = 0,
40  INFO,
41  WARN,
42  ERROR,
43  FATAL,
44  NONE
45 };
46 
47 inline std::string logLevelToString(const LogLevel level)
48 {
49  switch (level)
50  {
51  case LogLevel::DEBUG:
52  return "DEBUG";
53  case LogLevel::INFO:
54  return "INFO";
55  case LogLevel::WARN:
56  return "WARN";
57  case LogLevel::ERROR:
58  return "ERROR";
59  case LogLevel::FATAL:
60  return "FATAL";
61  default:
62  return "NONE";
63  }
64 }
65 } // namespace driver_svh
std::string logLevelToString(const LogLevel level)
Definition: LogLevel.h:47


schunk_svh_library
Author(s): Georg Heppner, Lars Pfotzer, Felix Exner, Johannes Mangler, Stefan Scherzinger, Pascal Becker
autogenerated on Fri Apr 14 2023 02:26:23