fix(ex05): use uppercase level specifiers
This commit is contained in:
parent
fd476b2c63
commit
3fa6069da8
2 changed files with 8 additions and 8 deletions
|
|
@ -5,10 +5,10 @@ typedef void (Harl::*HarlComplaint)(void);
|
||||||
|
|
||||||
int getLevelIdx(std::string level) {
|
int getLevelIdx(std::string level) {
|
||||||
static const std::string levels[] = {
|
static const std::string levels[] = {
|
||||||
"debug",
|
"DEBUG",
|
||||||
"info",
|
"INFO",
|
||||||
"warning",
|
"WARNING",
|
||||||
"error",
|
"ERROR",
|
||||||
};
|
};
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if (level == levels[i])
|
if (level == levels[i])
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ int main(void) {
|
||||||
Harl harl;
|
Harl harl;
|
||||||
|
|
||||||
harl.complain("Debug");
|
harl.complain("Debug");
|
||||||
harl.complain("debug");
|
harl.complain("DEBUG");
|
||||||
harl.complain("info");
|
harl.complain("INFO");
|
||||||
harl.complain("warning");
|
harl.complain("WARNING");
|
||||||
harl.complain("error");
|
harl.complain("ERROR");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue