mtail
mtail copied to clipboard
Can't chain two matches in same expression because they define the same caprefs
Expressions like:
getfilename() =~ "abc.log" && /expression/ {
are illegale bcause =~ abc.log and expression both cause capture group 0 to be inserted into the current scope, throwing a compile error.
To work around it, put the expression in an inner block like so:
getfilename)( =~ "abc.log" {
/expression/ {
...