Querylog 0.1 review

Download
by rbytes.net on

Querylog project is a console tool for performing SQL queries on a (log) file. Lines from one or more text files or stdin are matc

License: LGPL (GNU Lesser General Public License)
File size: 0K
Developer: Marcel Meulemans
0 stars award from rbytes.net

Querylog project is a console tool for performing SQL queries on a (log) file.

Lines from one or more text files or stdin are matched, using regular expressions to an in memory database on which SQL queries can be performed.

You also specify queries in the config file (SELECT's, INSERT's, CREATE VIEW's, etc). Queries that generate output are printed to stdout in plain text at the moment. In the future it will be possible to specify output formatters. The tool is written in C++ using the boost program options and regex library and the sqlite libraries for the in memory database.

I first wrote this tool to extract accounting information from cups page log files (in which accounting infomation was on different lines than job information), but due to the generic nature of the tool it can be used in many situations in which specific information needs to be retrieved from (in the future multiple) text files and presented in a more usable format.

Building:

You'll need the boost headers and libraries for (program_options and regex) which you can get at http://www.boost.org/, and the sqlite3 headers and libraries which you can get at http://www.sqlite.org/.

I'm using boost build, so if you have that all you have to do is run:

> bjam

Alternativly, as the program now has only a single source file, you can just use g++ to compile and link it.

I'll create a nicer build enviroment one of these days.

Running:

Options must be specified on the commandline or in a config file (key = ["]value["]). Run querylog --help for details. The input file may be ommited, in which case data will be read from stdin until the eof.

Querylog 0.1 keywords