Re: [Exim] Logging to a SQL database

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Wild Karl-Heinz
Fecha:  
A: David Jericho
Cc: exim-users
Asunto: 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