From c47d64605a1db19620bf7cbd42825098fbb8f06e Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 30 Oct 2021 10:43:05 +0200 Subject: [PATCH] Refer to FAQ entry on log block change, and some other relnotes updates. [skip ci] --- doc/RELEASE-NOTES.md | 10 ++++++---- src/log.c | 13 +++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/RELEASE-NOTES.md b/doc/RELEASE-NOTES.md index 3bcb95554..4382fc701 100644 --- a/doc/RELEASE-NOTES.md +++ b/doc/RELEASE-NOTES.md @@ -11,7 +11,7 @@ geoip support and remote includes support built-in. Additionally, things are more customizable such as what gets sent to which snomask. All the +vhoaq channel modes are now modular as well, handy for admins who don't want or need halfops or +q/+a. -Who gets to see what in WHOIS is also customizable in detail. +For WHOIS it is now customizable in detail who gets to see what. Breaking changes ----------------- @@ -27,7 +27,7 @@ Breaking changes destination { file "ircd.log" { maxsize 100M; } } - } + } ``` Enhancements @@ -40,8 +40,10 @@ Enhancements which everyone should include from unrealircd.conf. That is, unless you wish to completely reconfigure which logging goes to which snomasks yourself, which is also an option now. - * See ... on the new snomasks - lots of letters changed! - * See ... on how to change your existing log { } blocks for disk logging + * See [Snomasks](https://www.unrealircd.org/docs/Snomasks#UnrealIRCd_6) + on the new snomasks - lots of letters changed! + * See [FAQ: Converting log { } block](https://www.unrealircd.org/docs/FAQ#old-log-block) + on how to change your existing log { } blocks for disk logging. * New support for JSON logging to disk, instead of the default text format. JSON logging adds lot of detail to log messages and consistently expands things like 'client' with properties like hostname, diff --git a/src/log.c b/src/log.c index aa9b08e6a..2aa32ca2d 100644 --- a/src/log.c +++ b/src/log.c @@ -306,6 +306,19 @@ int config_test_log(ConfigFile *conf, ConfigEntry *block) } } + if (!any_sources && !destinations) + { + unreal_log(ULOG_ERROR, "config", "CONFIG_OLD_LOG_BLOCK", NULL, + "$config_file:$line_number: Your log block contains no sources and no destinations.\n" + "The log block changed between UnrealIRCd 5 and UnrealIRCd 6, " + "see https://www.unrealircd.org/docs/FAQ#old-log-block on how " + "to convert it to the new syntax.", + log_data_string("config_file", block->file->filename), + log_data_integer("line_number", block->line_number)); + errors++; + return errors; + } + if (!any_sources) { config_error("%s:%d: log block contains no sources. Old log block perhaps?",