Re: [Exim] Logging to a SQL database

Top Page
Delete this message
Reply to this message
Author: Wild Karl-Heinz
Date:  
To: David Jericho
CC: exim-users
Subject: Re: [Exim] Logging to a SQL database
Hallo David Jericho,

In message "[Exim] Logging to a SQL database"
on 16.07.2002, David Jericho <david.jericho@???> writes:

DJ> I'm currently looking at doing some logging to a SQL database so Exim
DJ> can interface with a billing engine.


DJ> Has anyone done anything like this, or am I going to be using Exim's
DJ> syslog facility with syslog-ng and a filter?


#! /usr/bin/env ruby

require 'dbi'

dbh = DBI.connect( 'DBI:Mysql:dbname', 'username', 'password' )
insertSQL = "Insert into syslog ( slg_text ) Values ( ? )"
stm = dbh.prepare( insertSQL )

while gets
        puts $_
        stm.execute( $_ )


It'll be pipped via syslogd.

--
Mit freundlichen Gruessen,
Wild Karl-Heinz
mailto:kh.wild@wicom.li