blob: 63015f912ac452334a3ad813519b5c47f53f1bd6 [file] [log] [blame]
#ifndef CASBIN_CPP_LOG_LOGGER
#define CASBIN_CPP_LOG_LOGGER
#include <string>
namespace casbin {
class Logger{
protected:
bool m_enable;
public:
//EnableLog controls whether print the message.
virtual void EnableLog(bool enable) = 0;
//IsEnabled returns if logger is enabled.
virtual bool IsEnabled() = 0;
//Print formats using the default formats for its operands and logs the message.
template <typename T, typename... Object>
void Print(T arg, Object... objects);
//Printf formats according to a format specifier and logs the message.
template <typename... Object>
void Printf(std::string, Object... objects);
};
} // namespace casbin
#endif