This script does not very well adhere to the Rule of Silence. For example, when there is nothing to do (e.g. the current subscribers and the flat file are the same) it prints "Nothing to do." to
As we're running this program every few minutes and any output is logged to our log server (with rsyslogd) which then sents daily emails with the logs there tend to be a lot of useless messages in it.
There are several ways to deal with this, and I'm wondering which one is the most appropriate one:
- Use rsyslogd filtering to specifically filter out these messages.
- Modify the source code of
sync_membersto adhere to the Rule of Silence.
- Copy the source code of
sync_members, modify the copy and use that one from now on.
While each would achieve the desired result, each has its disadvantages:
- What if at some time there's something interesting on
- Seems a rather "unclean" and "hackerish" solution, and I daresay there are a lot of programs our there not adhering to the Rule of Silence.
- What happens if there's an update?
- Same as 3.
I tend to option 2, though if I have to do this for every badly behaved program in our system...
What do you think? Is there an additional option or argument in favor or against? Is there a best practice for this case (I daresay this problem is not new)?