From ecf12a60e8f82df59b1cf1fcbab1609fb2dfd7f4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Nov 2013 22:20:11 +0100 Subject: 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". --- src/Log.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Log.hxx') diff --git a/src/Log.hxx b/src/Log.hxx index 38bc4a829..920a8d8a3 100644 --- a/src/Log.hxx +++ b/src/Log.hxx @@ -44,6 +44,11 @@ enum class LogLevel { */ INFO, + /** + * Interesting informational message. + */ + DEFAULT, + /** * Warning: something may be wrong. */ @@ -83,6 +88,16 @@ gcc_printf(2,3) 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) { -- cgit v1.2.3