1 #pragma once 2 3 #include "./LoggerInterface.h" 4 #include <memory> 5 6 namespace reanimated 7 { 8 9 class Logger { 10 public: 11 template<typename T> 12 static void log(T value) { 13 if (instance == nullptr) { 14 throw std::runtime_error("no logger specified"); 15 } 16 instance->log(value); 17 }; 18 private: 19 static std::unique_ptr<LoggerInterface> instance; 20 }; 21 22 }