Re: [Exim] Logging to a SQL database

Etusivu
Poista viesti
Vastaa
Lähettäjä: Wild Karl-Heinz
Päiväys:  
Vastaanottaja: David Jericho
Kopio: exim-users
Aihe: 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