You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by du...@yahoo.com on 2006/03/29 13:49:04 UTC

Configuring the DBAppender with org.apache.log4j.jdbc.JNDIConnectionSource

Dear,

Trying to use the Log4j-1.3 possibility to write the statements to the DB with the DB appender, it seems that this would be an approriate syntax in my Log4j.xml (cfr. proposed syntax by Ray in the Javadoc : http://logging.apache.org/log4j/docs/api-1.3/org/apache/log4j/db/JNDIConnectionSource.html)

    <appender name="DB" class="org.apache.log4j.db.DBAppender">
        <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
            <param name="jndiLocation" value="LogDS" />
        </connectionSource>
    </appender>

But it doesn't seem to work & XML-validation complains that "connectionSource" must be declared & appender does not respect the (errorHandler?, param*, layout?, filter*, appender-ref*)
 
Can someone tell me where I need to specify the declare the DataSource to use ... ?

\T,
  




 
-- Any fool can write code that a computer can understand. 
Good programmers write code that humans can understand.
                                                   Martin Fowler 
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@  : duvelbier-tsmets@yahoo.com
Do you skype too ... ?




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org