salsa  0.4.0
Object.hh
1 #pragma once
2 
3 #include "salsa.hh"
4 
5 namespace Salsa {
14 
15 class Object {
16 public:
17  Object();
18  virtual ~Object();
19 
21  static std::shared_ptr<spdlog::logger> getConsoleOutput()
22  {
23  // This method is inline, so compiler gets hinted very strongly to inline it.
24  // Aaaand it does not. (Clang 8.0.0 makes binary with method... So sad...)
25  return mspConsoleLogger;
26  }
27 
29  static void setConsoleLevel(spdlog::level::level_enum level) { mspConsoleLogger->set_level(level); }
30 
31 private:
32  static std::shared_ptr<spdlog::logger> mspConsoleLogger;
33 };
34 } // namespace Salsa
static std::shared_ptr< spdlog::logger > getConsoleOutput()
Get console output.
Definition: Object.hh:21
virtual ~Object()
Definition: Object.cc:9
static std::shared_ptr< spdlog::logger > mspConsoleLogger
Pointer to spd logger.
Definition: Object.hh:32
Base Salsa Object class.
Definition: Object.hh:15
static void setConsoleLevel(spdlog::level::level_enum level)
Sets console log level.
Definition: Object.hh:29