mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Initial commit
This commit is contained in:
32
common/logger/ILogger.h
Normal file
32
common/logger/ILogger.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <stdarg.h>
|
||||
|
||||
enum class LogLevel
|
||||
{
|
||||
Off,
|
||||
|
||||
Fatal,
|
||||
Error,
|
||||
Warning,
|
||||
Info,
|
||||
Debug,
|
||||
Trace,
|
||||
|
||||
All
|
||||
};
|
||||
|
||||
class ILogger
|
||||
{
|
||||
public:
|
||||
virtual ~ILogger() { }
|
||||
|
||||
void Log(LogLevel level, const char* fmt, ...)
|
||||
{
|
||||
va_list vlist;
|
||||
va_start(vlist, fmt);
|
||||
LogV(level, fmt, vlist);
|
||||
va_end(vlist);
|
||||
}
|
||||
|
||||
virtual void LogV(LogLevel level, const char* fmt, va_list vlist) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user