NAIA  1.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Logging.h
Go to the documentation of this file.
1 #ifndef NAIA_LOGGING_H
2 #define NAIA_LOGGING_H
3 
4 #include "spdlog/sinks/stdout_color_sinks.h"
5 #include "spdlog/spdlog.h"
6 
7 namespace NAIA {
8 namespace Logging {
9 void MuteOutput();
10 void UnmuteOutput();
11 } // namespace Logging
12 
18 inline auto getLogger(const std::string &fnName) {
19  auto logger = spdlog::get(fnName.data());
20  if (!logger)
21  logger = spdlog::stdout_color_st(fnName.data());
22  return logger;
23 }
24 } // namespace NAIA
25 
26 #endif
void UnmuteOutput()
Definition: Logging.cpp:36
void MuteOutput()
Definition: Logging.cpp:22
auto getLogger(const std::string &fnName)
Create a new logger with a given function name.
Definition: Logging.h:18