Using CFLogParser - adampresley/cflogparser GitHub Wiki
CFLogParser will scan and parse one or more ColdFusion log files and produce output in Excel, text, and more. This is handy when you need to find information across many ColdFusion log files across many servers and instances. CFLogParser runs as a command line tool and takes a series of various arguments to tell it what files to parse, what format or output to produce, and what the name of this output file is.
ColdFusion Enterprise installed on JRun will place log files in two place. The first path is in the directory for each instance setup on a server. The second, and more useful path is the JRun4/logs directory where all log files for each instance on a server is written to.
There are several types of log files written by ColdFusion but the ones of most interest for average application-based errors are the .out files. These are written using the Java library Log4J and usually follow a specific format, which is beneficial for us because CFLogParser understands that!
A Basic Example
To begin we'll start with a basic example of parsing a single ColdFusion log file. These examples assume that you have extracted CFLogParser into the folder /opt/cflogparser. If we have a log file named cfusion.out. The get an Excel output of all errors in this file we can run the following command.
$ java -jar /opt/cflogparser/dist/cflogparser.jar --file-list=cfusion.out --output-file=errors.xlsx
When then is run CFLogParser will take the input file from the argument --file-list and parse it, extracting any error messages into the resulting Excel spreadsheet name errors.xlsx, as indicated by the argument --output-file.
More to come...