Last change
on this file since 1124 was 1096, checked in by s10k, 7 years ago |
Added zlib, quazip, basicxmlsyntaxhighlighter, conditionalsemaphore and linenumberdisplay libraries. zlib and quazip are pre-compiled, but you can compile them yourself, just delete the dll files (or equivalent binary files to your OS)
|
File size:
986 bytes
|
Rev | Line | |
---|
[1096] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | namespace plog
|
---|
| 4 | {
|
---|
| 5 | enum Severity
|
---|
| 6 | {
|
---|
| 7 | none = 0,
|
---|
| 8 | fatal = 1,
|
---|
| 9 | error = 2,
|
---|
| 10 | warning = 3,
|
---|
| 11 | info = 4,
|
---|
| 12 | debug = 5,
|
---|
| 13 | verbose = 6
|
---|
| 14 | };
|
---|
| 15 |
|
---|
| 16 | inline const char* severityToString(Severity severity)
|
---|
| 17 | {
|
---|
| 18 | switch (severity)
|
---|
| 19 | {
|
---|
| 20 | case fatal:
|
---|
| 21 | return "FATAL";
|
---|
| 22 | case error:
|
---|
| 23 | return "ERROR";
|
---|
| 24 | case warning:
|
---|
| 25 | return "WARN";
|
---|
| 26 | case info:
|
---|
| 27 | return "INFO";
|
---|
| 28 | case debug:
|
---|
| 29 | return "DEBUG";
|
---|
| 30 | case verbose:
|
---|
| 31 | return "VERB";
|
---|
| 32 | default:
|
---|
| 33 | return "NONE";
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | inline Severity severityFromString(const char* str)
|
---|
| 38 | {
|
---|
| 39 | for (Severity severity = fatal; severity <= verbose; severity = static_cast<Severity>(severity + 1))
|
---|
| 40 | {
|
---|
| 41 | if (severityToString(severity)[0] == str[0])
|
---|
| 42 | {
|
---|
| 43 | return severity;
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | return none;
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.