logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Rowley" <p...@openrowley.com>
Subject Re: ODBCAppender on Linux
Date Wed, 19 May 2004 00:08:21 GMT
I had something similar recently - turned out I goofed by linking against
the .a, linking against the .la or the .so fixed the problem.

----- Original Message ----- 
From: "Lennart Goedhart" <lennart@omnibase.com.au>
To: <log4cxx-user@logging.apache.org>
Sent: Tuesday, May 18, 2004 4:52 PM
Subject: ODBCAppender on Linux


> I'm using log4cxx on both Windows and Linux.
> Here's my conf file:
> ------------------------------------------------
> log4j.rootLogger=INFO, logFile, database
>
> # Local log file settings for the application
> log4j.appender.logFile=org.apache.log4j.RollingFileAppender
> log4j.appender.logFile.File=server.log
> log4j.appender.logFile.MaxFileSize=100KB
> # Keep one backup file
> log4j.appender.logFile.MaxBackupIndex=1
> log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
> log4j.appender.logFile.layout.ConversionPattern=%5p %d [%t] - %m%n
>
> # Database appender (using PostgreSQL ODBC)
> log4j.appender.database=org.apache.log4j.ODBCAppender
> log4j.appender.database.URL=postgresql
> log4j.appender.database.layout=org.apache.log4j.PatternLayout
> log4j.appender.database.layout.ConversionPattern=%5p %d %m%n
> log4j.appender.database.sql=INSERT INTO events ( level, date, message )
> VALUES ('%5p', '%d', '%m%n' )
> ------------------------------------------------
>
> This works perfectly under Windows.
> On Linux, I get the following output when I run my app:
>
> Class 'org.apache.log4j.ODBCAppender' not found
> Could not instantiate appender named "database"
>
> When I configured on Linux, I ran:
> # ./configure --prefix=/usr --enable-unicode -with-ODBC=unixODBC
> When configure runs, it finds the unixODBC headers okay.
>
> Am I missing something else?
>
> Regards
> Lennart
>
>


Mime
View raw message