GT2/Ejectable/node_modules/react-native-reanimated/Common/cpp/hidden_headers/Logger.h

22 lines
370 B
C
Raw Normal View History

2021-08-16 00:14:59 +00:00
#pragma once
#include "./LoggerInterface.h"
#include <memory>
namespace reanimated
{
class Logger {
public:
template<typename T>
static void log(T value) {
if (instance == nullptr) {
throw std::runtime_error("no logger specified");
}
instance->log(value);
};
private:
static std::unique_ptr<LoggerInterface> instance;
};
}