Engineering notebook
on the rsyslog config file format…
A strength of rsyslog is that it support stock syslogd's config file format. One of its weaknesses, however, is that it support stock syslogd'd config file format.
Sound strange? Jepp - but it isn't. Understanding the old config format is great when it comes to replacing stock syslogd. It's easy for package maintainers and it is also easy for users (who do not necessarily need to learn anything new). However, that format is clumsy, especially when compared to syslog-ng. So there is already a lot of criticism for supporting that format.
To make matters worse, rsyslog's enhanced functionality requires some enhanced configuration directives. They have evolved as rsyslog has evolved. Currently, they are only somewhat ugly. But the more the project evolves, the more ugly they will become.
In short words: I do not like the current config file format. But on the other hand, I also do not like spending much time "just" on creating another config file parser. And I do not like the learning curve associated with it.
Seth Vidal, some weeks ago, recommended to have a directive in the config file specifying whether it is old-style or new-style. I'll probably follow this route. That would enable us to keep backwards compatible and allow users to re-use their knowledge. In "old format mode", features would be limited by the file format (and the users' ability to deal with it). The full glory would only be available in "new format mode". That sounds just fair, especially as users need to learn the new functionality and then it does not really matter if the need to learn a new conf format while they go along.
OK, that seems to be (somewhat solved).
But what format should be the new style format? Seth Vidal recommended a natural language like format (see his post on the rsyslog mailing list). However, there are many things unanswered. We don't just have filters, we have many things.
Let's go to the root question: what is a config file good for? In my personal view, it should
- enable the user to specify what the product should do in an easy and simple to follow way
- allow the application to create internal control structures that specify how the application works
- a pure natural-language look-alike like suggested by Seth Vidal (actually more a programming like type
- a purely XML-based file
- something like the apache config
- something close to the way syslog-ng does things