[logback-user] Help Logback and postgreSQL

Mohammad Haider mohammadh at lashpoint.com
Thu Mar 4 18:17:08 CET 2010

I got the following sql script to create table from Logback package and 
I ran it and created tables. and I have event_id data field in the tables.

# This SQL script creates the required tables by 
# It is intended for PostgreSQL databases.

DROP TABLE    logging_event_property;
DROP TABLE    logging_event_exception;
DROP SEQUENCE logging_event_id_seq;
DROP TABLE    logging_event;

CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START 1;

CREATE TABLE logging_event
    timestmp         BIGINT NOT NULL,
       formatted_message  TEXT NOT NULL,
    logger_name       VARCHAR(254) NOT NULL,
    level_string      VARCHAR(254) NOT NULL,
    thread_name       VARCHAR(254),
    reference_flag    SMALLINT,
    caller_filename   VARCHAR(254) NOT NULL,
    caller_class      VARCHAR(254) NOT NULL,
    caller_method     VARCHAR(254) NOT NULL,
    caller_line       CHAR(4) NOT NULL,
    event_id          INT DEFAULT nextval('logging_event_id_seq') 

CREATE TABLE logging_event_property
    event_id          INT NOT NULL,
    mapped_key        VARCHAR(254) NOT NULL,
    mapped_value      VARCHAR(1024),
    PRIMARY KEY(event_id, mapped_key),
    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)

CREATE TABLE logging_event_exception
    event_id         INT NOT NULL,
    i                SMALLINT NOT NULL,
    trace_line       VARCHAR(254) NOT NULL,
    PRIMARY KEY(event_id, i),
    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)

Ceki Gülcü wrote:
> On 04/03/2010 5:59 PM, Mohammad Haider wrote:
>> Thank you for quick reply.
>> I got the following output after putting the <statusListener> tag
>> 12:58:33,750 |-ERROR in ch.qos.logback.classic.db.DBAppender[DB] -
>> problem appending event org.postgresql.util.PSQLException: ERROR: column
>> "EVENT_ID" does not exist
> The error message "Column EVENT_ID does not exist" seems rather 
> explicit to me.
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user

* Mohammad Firoj Haider*
 Software Developer
 LashPoint Inc <http://www.lashpoint.com>
 Email: mohammadh at lashpoint.com <mailto:mohammadh at lashpoint.com>
 Blog: The Daily Programming <http://www.codinglogs.blogspot.com/>

  Lashpoint mini logo

More information about the Logback-user mailing list