Querylog 0.1

Querylog is a console tool for performing SQL queries on a (log) file.
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.


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.


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.

last updated on:
July 21st, 2006, 19:24 GMT
license type:
LGPL (GNU Lesser General Public License) 
developed by:
Marcel Meulemans
ROOT \ System \ Logging
Download Button

In a hurry? Add it to your Download Basket!

user rating 16



Rate it!

Add your review!