aboutsummaryrefslogtreecommitdiffstats
path: root/src/Log.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-04 22:20:11 +0100
committerMax Kellermann <max@duempel.org>2013-11-04 22:27:49 +0100
commitecf12a60e8f82df59b1cf1fcbab1609fb2dfd7f4 (patch)
tree2ac4cbbf24625362f49c39e7aac3f5b3a4470e32 /src/Log.hxx
parent6de85cb047b3859f0e1b6d6db86cb735882278c8 (diff)
downloadmpd-ecf12a60e8f82df59b1cf1fcbab1609fb2dfd7f4.tar.gz
mpd-ecf12a60e8f82df59b1cf1fcbab1609fb2dfd7f4.tar.xz
mpd-ecf12a60e8f82df59b1cf1fcbab1609fb2dfd7f4.zip
Log: add level "DEFAULT"
Map LogLevel::INFO to G_LOG_LEVEL_INFO, and LogLevel::DEFAULT to G_LOG_LEVEL_MESSAGE. Now client connect/disconnect message are only logged on log_level "secure".
Diffstat (limited to 'src/Log.hxx')
-rw-r--r--src/Log.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Log.hxx b/src/Log.hxx
index 38bc4a829..920a8d8a3 100644
--- a/src/Log.hxx
+++ b/src/Log.hxx
@@ -45,6 +45,11 @@ enum class LogLevel {
INFO,
/**
+ * Interesting informational message.
+ */
+ DEFAULT,
+
+ /**
* Warning: something may be wrong.
*/
WARNING,
@@ -84,6 +89,16 @@ void
FormatInfo(const Domain &domain, const char *fmt, ...);
static inline void
+LogDefault(const Domain &domain, const char *msg)
+{
+ Log(domain, LogLevel::DEFAULT, msg);
+}
+
+gcc_printf(2,3)
+void
+FormatDefault(const Domain &domain, const char *fmt, ...);
+
+static inline void
LogWarning(const Domain &domain, const char *msg)
{
Log(domain, LogLevel::WARNING, msg);