NAME
LogFilter - A simple log filter
SYNOPSIS
use LogFilter;
my $filter = LogFilter->new('keywords.txt', 'exclude.txt', '/var/log/syslog');
$filter->filter();
DESCRIPTION
This module provides a simple way to filter log files. It takes as input a keywords file, an exclude file and the log file to be filtered.
METHODS
- new($keywords_file, $exclude_file, $log_file)
-
The constructor. It takes three arguments: the keywords file, the exclude file, and the log file. It returns a new instance of LogFilter.
- filter()
-
This method filters the log file, printing lines that match any of the keywords and do not match any of the exclude phrases.
AUTHOR
Kawamura Shingo <pannakoota@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2023 by Kawamura Shingo
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.28.1 or, at your option, any later version of Perl 5 you may have available.