From 3e0ceb12d50e50ccd11a15082d76a68b9d141202 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Sep 2020 14:00:24 +0200 Subject: [PATCH] LogInit: rename "secure" to "info" Calling this "secure" never made sense. Messages about client connects are just a small part of what gets logged as "secure", a.k.a. "info". --- doc/mpd.conf.5.rst | 2 +- src/LogInit.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/mpd.conf.5.rst b/doc/mpd.conf.5.rst index 6f7986917..e48c17df7 100644 --- a/doc/mpd.conf.5.rst +++ b/doc/mpd.conf.5.rst @@ -82,7 +82,7 @@ log_level log levels are available: - :samp:`default`: interesting informational messages - - :samp:`secure`: unimportant informational messages + - :samp:`info`: unimportant informational messages - :samp:`verbose`: debug messages (for developers and for troubleshooting) diff --git a/src/LogInit.cxx b/src/LogInit.cxx index 7407a016d..d6070ed04 100644 --- a/src/LogInit.cxx +++ b/src/LogInit.cxx @@ -42,8 +42,6 @@ #include #include -#define LOG_LEVEL_SECURE LogLevel::INFO - #define LOG_DATE_BUF_SIZE 16 #define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1) @@ -99,8 +97,10 @@ parse_log_level(const char *value) { if (StringIsEqual(value, "default")) return LogLevel::DEFAULT; - if (StringIsEqual(value, "secure")) - return LOG_LEVEL_SECURE; + else if (StringIsEqual(value, "info") || + /* deprecated since MPD 0.22: */ + StringIsEqual(value, "secure")) + return LogLevel::INFO; else if (StringIsEqual(value, "verbose")) return LogLevel::DEBUG; else