Commit 60bbc9f6 authored by Max Kellermann's avatar Max Kellermann

LogInit: use StringIsEqual()

parent 065926d6
......@@ -28,6 +28,7 @@
#include "fs/FileSystem.hxx"
#include "util/Domain.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringAPI.hxx"
#include "system/Error.hxx"
#include <cassert>
......@@ -96,11 +97,11 @@ log_init_file(int line)
static inline LogLevel
parse_log_level(const char *value)
{
if (0 == strcmp(value, "default"))
if (StringIsEqual(value, "default"))
return LogLevel::DEFAULT;
if (0 == strcmp(value, "secure"))
if (StringIsEqual(value, "secure"))
return LOG_LEVEL_SECURE;
else if (0 == strcmp(value, "verbose"))
else if (StringIsEqual(value, "verbose"))
return LogLevel::DEBUG;
else
throw FormatRuntimeError("unknown log level \"%s\"", value);
......@@ -160,7 +161,7 @@ log_init(const ConfigData &config, bool verbose, bool use_stdout)
throw std::runtime_error("config parameter 'log_file' not found");
#endif
#ifdef HAVE_SYSLOG
} else if (strcmp(param->value.c_str(), "syslog") == 0) {
} else if (StringIsEqual(param->value.c_str(), "syslog")) {
LogInitSysLog();
#endif
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment