Inspired by countless hours spent fishing something useful out of the text logs, I've decided to put this problem to an end. There are a bunch of other solutions to this issue, but I find them either too bulky, or not customizable or even non-free :)
Prerequisites:
- JDK 7
- Maven
- Get a copy of the main git repo:
git clone https://github.com/bravo2zero/loggi.git
- Build loggi using Maven:
mvn clean install
- You will find the final jar package in
${project.base.dir}/target/
folder.
Loggi is a command line tool to analyse practically any log file. The idea is to write a json based template configuration file to let loggi know how exactly you need the log file to be parsed:
-
Create template file according to your log format and requirements. Check example templates and see Wiki documentation on Template File Format
-
Run loggi, providing source log file:
java -jar loggi.jar -t ${template.json.file} -s ${source.log.file}
-
Once you see a prompt, you can access results through browser (default http://localhost:8082):
JDBC URL: jdbc:h2:mem:loggi User: user Password: password
- Use H2 Console to manipulate your logs and make further analisys (table 'records').
- Get more help on loggi from command-line (parameters, currently available processor types and configuration)
Of course the main reason to put Loggi on GitHub was to support the spirit of an open source software development, letting as much people as possible to use and improve this tool. Please feel free to contact author if you want to become a Contributor. Any other kind of feedback is very much appreciated.