aboutsummaryrefslogtreecommitdiff
path: root/src/common/Logging/Log.cpp
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-07-31 20:53:13 +0000
committerGitHub <noreply@github.com>2020-07-31 22:53:13 +0200
commit7cf122fc2a604bae77d0b935536c41ec9203e62d (patch)
tree029e18afdceae5ebab686103ee9050a6c6727688 /src/common/Logging/Log.cpp
parent5b863acf9285d675a61819d939f38297f49d5c92 (diff)
Core/Misc: Fix static analysis issues (#25178)
Diffstat (limited to 'src/common/Logging/Log.cpp')
-rw-r--r--src/common/Logging/Log.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp
index 13720c4ba41..436f0366064 100644
--- a/src/common/Logging/Log.cpp
+++ b/src/common/Logging/Log.cpp
@@ -270,12 +270,13 @@ std::string Log::GetTimestampStr()
aTm.tm_year + 1900, aTm.tm_mon + 1, aTm.tm_mday, aTm.tm_hour, aTm.tm_min, aTm.tm_sec);
}
-bool Log::SetLogLevel(std::string const& name, char const* newLevelc, bool isLogger /* = true */)
+bool Log::SetLogLevel(std::string const& name, int32 newLeveli, bool isLogger /* = true */)
{
- LogLevel newLevel = LogLevel(atoi(newLevelc));
- if (newLevel < 0)
+ if (newLeveli < 0)
return false;
+ LogLevel newLevel = LogLevel(newLeveli);
+
if (isLogger)
{
auto it = loggers.begin();