The syslog-ng configuration starts with a version number declaration. Up until recently, if it was missing, syslog-ng did not start. With syslog-ng 4.8, this is changing.

From this blog, you can learn why version information is useful, what workaround you can use if you do not want to edit your syslog-ng configuration on each update, and what changed in version 4.8.

What is a version number declaration?

It is the first line of a syslog-ng configuration and looks like this:

@version: 4.3

Why is version information important?

When you prepare a syslog-ng configuration, you write it with the actual syslog-ng version in mind. There are many defaults baked into syslog-ng. Sometimes these change. The list of expected parameters of a configuration item sometimes changes. However, as long as the version number is properly set at the beginning of syslog-ng.conf, syslog-ng maintains full backwards compatibility in most cases.

If there were any important changes in syslog-ng that affect your configuration, syslog-ng will print information about it on startup, so you can adjust your configuration. Yes, a warning to update the version information in your configuration can be annoying, and some extra work. But it also serves a good purpose: the behavior of syslog-ng does not change unexpectedly after an upgrade.

Using “current” instead of a version number

If you really know what you are doing and you are not afraid of the possible side-effects, you can use “current” instead of an acutal syslog-ng version number:

@version: current

On the one hand, it makes your life easier: you do not have to edit your syslog-ng.conf on each upgrade. There are no warnings about the version numbers, no warnings about changed features.

On the other hand, it masks changes. It is most likely not a fatal problem when the change is minor, like the default size of a buffer. However, sometimes there are major changes, like adding data type support. Output generated by syslog-ng might be completely different. Or syslog-ng might stop, because of an incompatible change, which could have started with a warning if detected with a proper version number declaration.

What changed?

Starting with syslog-ng version 4.8, the lack of version declaration does not stop syslog-ng anymore. Instead, it provides you with a warning message:

WARNING: no version information provided in the configuration file. Please specify `current` to use the latest version and silence this warning, or specify a specific version number using @version as the first line in the configuration file.

Which means that you need to have a conscious decision about how you declare the version to remove the warning message.

-

If you have questions or comments related to syslog-ng, do not hesitate to contact us. You can reach us by email or even chat with us. For a list of possibilities, check our GitHub page under the “Community” section at https://github.com/syslog-ng/syslog-ng. On Twitter, I am available as @PCzanik, on Mastodon as @Pczanik@fosstodon.org.

Related Content