-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.cpp
More file actions
32 lines (26 loc) · 887 Bytes
/
Example.cpp
File metadata and controls
32 lines (26 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Uncomment to change the default log level of _Log_
// It MUST be defined BEFORE including _Log_.h
// #define _Log_DefaultLevel_ error
// #include <_Log_/SetDefaultLevel/error.h>
// #include <_Log_/SetDefaultLevel/trace.h>
// And then this...
// #include <_Log_/_Log_.h>
// #include <_Log_/_SetLogLevel_.h>
#include <_Log_.h>
int main() {
// Uncomment to test setting a specific log file path
// _LogToFile_("Example2.log");
// Uncomment to test setting a specific log level
// _SetLogLevel_(trace);
_SetLogLevel_(warn);
_Trace_("Trace");
_Debug_("Debug");
_Debug_("Debug {}", 123);
_Info_("Info {}", 420);
_Warn_("Warn");
_Error_("Error");
_Fatal_("Fatal");
// Standard '_Log_' which you get from just #include <_Log_/Log.h>
// (INFO unless #define _Log_DefaultLevel_ is set BEFORE including _Log_.h)
_Log_("Log!");
}