Skip to content

Commit 216df1d

Browse files
committed
silence tidy error
1 parent 14a6049 commit 216df1d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/viam/sdk/log/logger.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)