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".
This commit is contained in:
15
src/Log.hxx
15
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user