skullc-peripherals/Utility/Inc/utility_ilogger.hpp
Erki 55a8efa579
All checks were successful
continuous-integration/drone/push Build is passing
Clang format pass
2021-04-03 17:49:25 +03:00

44 lines
756 B
C++

/*
* utility_ringbuffer.hpp
*
* Created on: Mar 12, 2021
* Author: erki
*/
#ifndef SKULLC_UTILITY_ILOGGER_HPP_
#define SKULLC_UTILITY_ILOGGER_HPP_
#include <cstdint>
namespace Utility
{
class ILogger
{
public:
enum class LogLevel : std::uint8_t
{
LOG_DEBUG = 0,
LOG_INFO,
LOG_NOTICE,
LOG_WARNING,
LOG_ERROR,
LOG_FATAL
};
constexpr static const char* level_strs[] = {"DEBUG", "INFO", "NOTICE",
"WARNING", "ERROR", "FATAL"};
ILogger() = default;
ILogger(const ILogger&) = delete;
ILogger(ILogger&&) = delete;
virtual ~ILogger() = default;
virtual void log(const char* format, ...) = 0;
};
}// namespace Utility
#endif// SKULLC_UTILITY_ILOGGER_HPP_