OGS  v6.4.0
Logging.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <spdlog/logger.h>
15 
16 #include <memory>
17 #include <string>
18 
19 namespace BaseLib
20 {
21 extern std::shared_ptr<spdlog::logger> console;
22 void setConsoleLogLevel(std::string const& level_string);
23 
24 } // namespace BaseLib
25 
26 template <typename... Args>
27 void DBUG(char const* fmt, Args const&... args)
28 {
29  BaseLib::console->debug(fmt, args...);
30 }
31 template <typename... Args>
32 void INFO(char const* fmt, Args const&... args)
33 {
34  BaseLib::console->info(fmt, args...);
35 }
36 template <typename... Args>
37 void WARN(char const* fmt, Args const&... args)
38 {
39  BaseLib::console->warn(fmt, args...);
40 }
41 template <typename... Args>
42 void ERR(char const* fmt, Args const&... args)
43 {
44  BaseLib::console->error(fmt, args...);
45 }
46 template <typename... Args>
47 void CRITICAL(char const* fmt, Args const&... args)
48 {
49  BaseLib::console->critical(fmt, args...);
50 }
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
void CRITICAL(char const *fmt, Args const &... args)
Definition: Logging.h:47
void ERR(char const *fmt, Args const &... args)
Definition: Logging.h:42
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
void WARN(char const *fmt, Args const &... args)
Definition: Logging.h:37
std::shared_ptr< spdlog::logger > console
Definition: Logging.cpp:29
void setConsoleLogLevel(std::string const &level_string)
Definition: Logging.cpp:34