Hi all,
I would appreciate your feedback on backward compatibility. I have
started to create a loadable input module interface in rsyslog v3. My
first input module is the mark message handler (because it has almost no
code, so it was a good example of what needs to be done...). I have now
basically have finished an initial version. The interface needs to be
changed in the longer term, but I'll postpone that until I've done a bit
more work on the config interface. Now I am facing a problem with
backward compatibility:
In sysklogd/rsyslog pre-v3, the -m option controls how often mark
messages are written (with -m0 disabling this mechanism). In v3, the
$MarkMessagePeriod config file directive does the same. However, a
$modload immark is necessary to activate that functionality because
otherwise the module is not loaded (which is good if it is not needed).
When trying to remain backward-compatible, I have an issue when the -m
option is absent. If so, that means a mark message period of 20 minutes.
However, it is hard to detect what may be intended in v3 if this option
is not present. Does it mean the former default (running as a drop-in
replacement) or does it actually mean that no mark messages should
appear if no such directive is in rsyslog.conf?
Do you think it would be acceptable to not emit messages in this case,
slightly breaking backward compatibility? Or should I come up with a
solution. The later would probably require a specific option setting to
disable the -m option and its default (somehow telling "I am not running
in v2 compatibility mode").
I am not sure what is best...
Rainer
I would appreciate your feedback on backward compatibility. I have
started to create a loadable input module interface in rsyslog v3. My
first input module is the mark message handler (because it has almost no
code, so it was a good example of what needs to be done...). I have now
basically have finished an initial version. The interface needs to be
changed in the longer term, but I'll postpone that until I've done a bit
more work on the config interface. Now I am facing a problem with
backward compatibility:
In sysklogd/rsyslog pre-v3, the -m option controls how often mark
messages are written (with -m0 disabling this mechanism). In v3, the
$MarkMessagePeriod config file directive does the same. However, a
$modload immark is necessary to activate that functionality because
otherwise the module is not loaded (which is good if it is not needed).
When trying to remain backward-compatible, I have an issue when the -m
option is absent. If so, that means a mark message period of 20 minutes.
However, it is hard to detect what may be intended in v3 if this option
is not present. Does it mean the former default (running as a drop-in
replacement) or does it actually mean that no mark messages should
appear if no such directive is in rsyslog.conf?
Do you think it would be acceptable to not emit messages in this case,
slightly breaking backward compatibility? Or should I come up with a
solution. The later would probably require a specific option setting to
disable the -m option and its default (somehow telling "I am not running
in v2 compatibility mode").
I am not sure what is best...
Rainer