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

**URL:** <https://forum.inductiveautomation.com/t/problem-for-the-config-of-log4j-appender-jdbc-for-postgresql/3506>\
**Category:** Ignition\
**Created:** [October 27, 2011, 11:49am UTC](https://forum.inductiveautomation.com/t/problem-for-the-config-of-log4j-appender-jdbc-for-postgresql/3506 "2011-10-27T11:49:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 27, 2011, 11:49am UTC](https://forum.inductiveautomation.com/t/problem-for-the-config-of-log4j-appender-jdbc-for-postgresql/3506/1 "2011-10-27T11:49:13Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![cristihcd](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cristihcd](https://forum.inductiveautomation.com/u/cristihcd)\
**Post date:** [January 25, 2018, 10:53am UTC](https://forum.inductiveautomation.com/t/problem-for-the-config-of-log4j-appender-jdbc-for-postgresql/3506/2 "2018-01-25T10:53:25Z")

</div>

Hi,

Apologies for ressurecting an old thread.

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

Thanks
