I am trying to use im_file on a Windows server to monitor all *.log files in one folder which do not contain an underscore "_" character, e.g., someApplication_YYYYMMDD.log should not be monitored, but someApplication.log should be monitored. This is what I have tried.

<Input allfiles>
  Module im_file
  File 'C:\\Temp\\Logs\\*[!_].log'
  SavePos TRUE
  InputType LineBased

AskedMay 22, 2015 - 7:30pm

Answer (1)

I think the asterisk will match all characters - including the underscore. Unfortunately glob patterns are not as powerful as regular expressions.

Not sure if it's feasible but you could define someApplication.log without the wildcards. If you have more than one then add more im_file instances for each of these.