Balazs Scheidler <bazsi@balabit.hu> writes:
On Sat, 2011-10-15 at 10:59 +0200, Gergely Nagy wrote:
With the -q/--silent-module-load option set (defaults to off), no warnings will be printed when a module cannot be found.
If it's found, but cannot be loaded, a message is still printed. If it is used later in the config, that's still handled correctly.
The flag only suppresses the warning, and nothing else.
I'm not sure why you'd want to do this, could you elaborate? Thanks.
The main reason is that syslog-ng 3.2 in Debian has all modules in a single package, but with 3.3, they're going to be split out into separate packages (with the syslog-ng package depending on -core and the -modules). And the default modules to load was therefore set to only those modules that remained in the -core package, so that configs that do not use, say, SQL, won't try to load afsql module, and emit a warning each time syslog-ng is started up. Instead, the module packages provide a file under /etc/syslog-ng/conf.d/, which is sourced by the updated syslog-ng.conf. However, there was one case I did not consider: when the user modified syslog-ng.conf already, the include did not get added, and thus, when upgrading, the afsql module wasn't loaded. If they used SQL destinations, then the upgrade broke, because syslog-ng wouldn't start up. To work around this issue, the best idea I could come up with, is to re-enable the afsql module by default. But that would result in a module not found warning when the appropriate package is not installed. So, I figured it'd be a reasonable middleground to add a flag that stops the warning from being printed: if a module is not found, and is not used, so be it. If it would be used, syslog-ng will error out later anyway. All in all, my reason for the flag is to silence a warning in case we know that we'll try to load modules that may or may not be installed, and we don't really care about it, if they're not there, and aren't used anyway. -- |8]