File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -35,26 +35,26 @@ std::string to_string(log_level lvl) {
3535 }
3636}
3737
38- log_level level_from_string (std::string str ) {
38+ log_level level_from_string (std::string level ) {
3939 using ll = log_level;
4040
41- std::transform (str .begin (), str .end (), str .begin (), ::tolower);
41+ std::transform (level .begin (), level .end (), level .begin (), ::tolower);
4242
43- if (str == " info" ) {
43+ if (level == " info" ) {
4444 return ll::info;
45- } else if (str == " warn" || str == " warning" ) {
45+ } else if (level == " warn" || level == " warning" ) {
4646 return ll::warn;
47- } else if (str == " error" ) {
47+ } else if (level == " error" ) {
4848 return ll::error;
49- } else if (str == " debug" ) {
49+ } else if (level == " debug" ) {
5050 return ll::debug;
51- } else if (str == " trace" ) {
51+ } else if (level == " trace" ) {
5252 return ll::trace;
53- } else if (str == " fatal" ) {
53+ } else if (level == " fatal" ) {
5454 return ll::fatal;
5555 }
5656
57- VIAM_LOG (warn) << " Returning unknown log level " << str << " as info" ;
57+ VIAM_LOG (warn) << " Returning unknown log level " << level << " as info" ;
5858 return ll::info;
5959}
6060
You can’t perform that action at this time.
0 commit comments