Problem for the config of log4j.appender.jdbc for postgresql

I would like to add a log appender to store the log in a postgresql database

I create the table in postgresql:

table:

create table log4j_messages
(
message varchar(2000),
class varchar(255),
priority varchar(64),
log_date timestamp
);

I add this line in the file C:\Program Files\Inductive Automation\Ignition\data\log4j.properties

log4j.appender.jdbc=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.jdbc.driver=org.postgresql.Driver
log4j.appender.jdbc.URL=jdbc:postgresql://localhost:5432/frontalpae
log4j.appender.jdbc.user=postgres
log4j.appender.jdbc.password=siai
log4j.appender.jdbc.sql=INSERT INTO log4j_messages (message, class, priority, log_date) values (’%m’, ‘%c’, ‘%p’, to_timestamp(’%d’, ‘YYYY-MM-DD HH24:MI:SS,MS’))

I add the file postgresql-9.0-801.jdbc4.jar in the lib directory and in the lib\core\gateway directory.
But no log in postgresql ?
Any idea ?

Hi,

Apologies for ressurecting an old thread.

Did you solve it? I’m trying to add https://github.com/t0xa/gelfj and I’m getting errors on gateway startup (class not found).

Thanks