Name | Modified | Size | Downloads / Week |
---|---|---|---|
LogFilter | 2014-03-02 | ||
readme.txt | 2012-04-02 | 3.6 kB | |
Totals: 2 Items | 3.6 kB | 2 |
LogFilter is a highly configurable log file filter utility written in Perl language. (Source file runs on Windows and Unix systems.) It is for examining log or any ascii files. The script may be runned recursively if needed. It creates html extracts from the original files, containing only the filtered expressions (highlighted) and some lines around the hits. The program can send the result as an e-mail, too. The config options stored in standard *.ini file which contains the search criterias, e-mail settings and other useful options (see the SAMPLE INI FILE section). Usage: LogFilter <LOCATION> -conf:<CONFIG_FILE> [-r -m -q -h -v -ini] <LOCATION>* file or folder <CONFIG_FILE>* name of the configuration file (there must not be space(s) between the colon and the CONFIG_FILE name) [-r] recursive mode [-m]* send LogFilter results by e-mail [-q] quiet mode [-h] displays this help and exits [-v] displays program version and exits [-ini] creates a sample *.ini file (logfilter_TEST.ini) and exits *Note1: You may use quotation marks for special paths or file names if needed (ie.: "spaces in my path" or "my config file.conf"). *Note2: The config file must be located in the same directory where the program can be found. *Note3: in case of no -m option, LogFilter result(s) will be redirected to <LOCATION>\LogFilter folder as HTML file(s). Eg.: LogFilter MyLogs -conf:logfilter_TEST.ini o this will examine all files in the folder MyLogs and make HTML extracts to the predefined resultdir (it will called "YourFilteredLogsFolder" in case of using the SAMPLE INI FILE) Sample INI file: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; L O G F I L T E R S A M P L E I N I F I L E ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; required arguments: ; o findWhat, section [FindWhat] ; o smtpServer, section [Email] (only with -m option) ; o mailTo, section [Email] (only with -m option) ; ; default values (in case of missing arguments) ; o resultDir, section [General] = 'logfilter' ; o extraLines, section [General] = 3 (must be a positive integer) ; o urlPath, section [General] = '' (valid values: LOCAL, UNC) ; o mailFrom, section [Email] = 'logfilter@logfilter.com' ; ; note: name of arguments are Case Sensitive! [General] resultDir = 'YourFilteredLogsFolder' extraLines = 2 urlPath = UNC [FindWhat] findWhat = 'some', 'error', 'like', 'word', 'with', 'regexp if needed', 'eg\.:\s+ora-\d+' [Email] smtpServer = 'YourMailServerName.ItsDomain.com' mailFrom = 'Yourname@YourDomain.com' mailTo = 'ToWhomItMayConcern@ItsDomain.com', 'AnotherPerson@ItsDomain.com' LogFilter is ideal for investigating and indicating special strings (eg.: errors or program output messages) even in huge log files. The binary version is ready to use on Windows systems, but the source is unix compatible (so you can use it with perl interpreter). Prerequisites: Binary version: nothing Perl version needs the underlisted modules to be installed on your system: o File::Find o File::Basename o MIME::Lite o Config::Simple Any modern version of perl contains File::Find and File::Basename modules, so probable you will have to install only the last two modules from the list above (both of them available via ppm or cpan). Any question answered here at SourceForge Discussions. Zsolt Hidasi (2012)