From 4e511da9fb91c42748829861a9773dd0ec5d7b10 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 24 Sep 2021 15:52:41 +0200 Subject: [PATCH] Update default logging conf [skip ci] --- doc/conf/examples/example.conf | 12 ++++++++++-- doc/conf/snomasks.default.conf | 4 ++++ src/log.c | 13 ++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/doc/conf/examples/example.conf b/doc/conf/examples/example.conf index bf1ec00fd..d2750359e 100644 --- a/doc/conf/examples/example.conf +++ b/doc/conf/examples/example.conf @@ -265,11 +265,19 @@ drpass { * See also https://www.unrealircd.org/docs/Log_block */ -/* This is a good default, it logs nearly everything */ +/* This is a good default, it logs everything except + * debug stuff and join/part/kick. + */ log { source { all; - !SOMETHING; + !debug; + !join.LOCAL_CLIENT_JOIN; + !join.REMOTE_CLIENT_JOIN; + !part.LOCAL_CLIENT_PART; + !part.REMOTE_CLIENT_PART; + !kick.LOCAL_CLIENT_KICK; + !kick.REMOTE_CLIENT_KICK; } destination { file "ircd.log" { maxsize 100M; } diff --git a/doc/conf/snomasks.default.conf b/doc/conf/snomasks.default.conf index 910d483b4..070dbc929 100644 --- a/doc/conf/snomasks.default.conf +++ b/doc/conf/snomasks.default.conf @@ -14,6 +14,7 @@ log { tkl.TKL_DEL; tkl.TKL_ADD_TEMPSHUN; tkl.TKL_DEL_TEMPSHUN; + tkl.TKL_EXPIRE; tkl.RMTKL_COMMAND; } destination { @@ -188,6 +189,7 @@ log { source { link; oper; + !debug; nomatch; } destination { @@ -225,6 +227,8 @@ log { tls.TLS_CERT_EXPIRING; /* SAMODE: needed for snomask 'o' */ samode.SAMODE_COMMAND; + /* Never any debug messages */ + !debug; } destination { remote; diff --git a/src/log.c b/src/log.c index 15e02dbae..30bf4775c 100644 --- a/src/log.c +++ b/src/log.c @@ -1686,6 +1686,17 @@ void postconf_defaults_log_block(void) /* And the source filter */ ls = add_log_source("all"); AppendListItem(ls, l->sources); - ls = add_log_source("!SOMETHING"); + ls = add_log_source("!debug"); AppendListItem(ls, l->sources); + ls = add_log_source("!join.LOCAL_CLIENT_JOIN"); + AppendListItem(ls, l->sources); + ls = add_log_source("!join.REMOTE_CLIENT_JOIN"); + AppendListItem(ls, l->sources); + ls = add_log_source("!part.LOCAL_CLIENT_PART"); + AppendListItem(ls, l->sources); + ls = add_log_source("!part.REMOTE_CLIENT_PART"); + AppendListItem(ls, l->sources); + ls = add_log_source("!kick.LOCAL_CLIENT_KICK"); + AppendListItem(ls, l->sources); + ls = add_log_source("!kick.REMOTE_CLIENT_KICK"); }