Page 1 of 1

how to exclude filenames

Posted: Fri Jun 07, 2019 8:23 pm
by newmember
How do I exclude files with "snapshot" in the end of the filename?:
SIP_Server.20190512_020807_602.snapshot.log

This the standard name format for the log files I want look like this:
SIP_Server.20190512_020807_800.log



<Input sip_p>
Module im_file
File 'E:\Logs\SIP_Server.*.log'
InputType sip_multiline_header
SavePos FALSE
</Input>

Re: how to exclude filenames

Posted: Mon Jun 10, 2019 9:22 am
by scottwilkerson
I believe you can use something like this

Code: Select all

<Input sip_p>
Module im_file
File 'E:\Logs\SIP_Server.*.log'
$FileName = file_name();
if $FileName =~ /.*snapshot.*/s drop();
InputType sip_multiline_header
SavePos FALSE
</Input>