SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
                                   querylog
                                  version 0.1
                              by Marcel Meulemans 
                          <k1p@users.sourceforge.net>

I. Description

Querylog is a console tool for performing SQL queries on (log) files. Lines from one or more files are matched, using regular expressions, and inserted into an in memory database on which SQL queries can be performed. Options can be specified on the commandline or in a config file. 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.

II. License

This program is released under the LGPL.

III. 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.

VI. 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.

V. Feedback

Comment, bug reports and feature requests are most welcome. Please go to: http://sourceforge.net/projects/querylog/


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.