8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
27
28
29
39
40
41
45
46
47
51
52
53
54
55
57 if (level < currentLevel() || level ==
NONE)
return;
60 vlog(level, fmt, args);
67 Level& currentLevel() {
return lvl; }
69 void vlog(
Level level,
const char* fmt, va_list args) {
70 const char* levelNames[] = {
"DEBUG",
"INFO",
"WARN",
"ERROR"};
72 printf(
"[%s] ", levelNames[level]);
Simple header-only logger for TinyGPU with log levels and vararg support.
Definition: TinyGPULogger.h:24
Level
Logging levels for TinyGPULogger.
Definition: TinyGPULogger.h:30
@ DEBUG
Detailed debug information.
Definition: TinyGPULogger.h:31
@ ERROR
Errors only.
Definition: TinyGPULogger.h:34
@ INFO
General information.
Definition: TinyGPULogger.h:32
@ WARN
Warnings.
Definition: TinyGPULogger.h:33
@ NONE
Disable all logging.
Definition: TinyGPULogger.h:35
void log(Level level, const char *fmt,...)
Log a message with printf-style formatting.
Definition: TinyGPULogger.h:56
void setLevel(Level level)
Set the current log level.
Definition: TinyGPULogger.h:42
Level getLevel()
Get the current log level.
Definition: TinyGPULogger.h:48
Definition: AVIWriter.h:9