Balazs Scheidler <bazsi77@gmail.com> writes:
----- Original message -----
I am considering using the patterndb to rewrite messages that do not conform to syslog standards.
Can the patterndb change all normally defined macros? I need to be able to change MSGHDR MESSAGE PROGRAM PID MSG MSGONLY and I think that is all. I know that macros such as MSGHDR can not be changed by the rewrite command but can it be changed by the patterndb?
there are two kinds of 'macros' within syslog-ng (and I'm considering a name change because of that). some of them are like registers, contain a given value, can be changed at will. I plan to name these properties in the future.
others are basically derived values, where syslog-ng programmatically creates the value when needed. these cannot be changed. these would be called read-only properties.
Wouldn't it be clearer if the read-only values would be turned into template functions? Or at least, make them appear like one? Then the whole confusion could be avoided, as far as I see. (Though, for backwards compatibility, they'd still work as 'ordinary' read-only macros) Another option would be to trigger updating these select macros whenever the values that they depend on change, but only when they weren't explicitly set. But this would add a noticable cost to paths we may not want that cost on... -- |8]