This is a bug. JDBCAppender.requiresLayout should return true. It does not 
matter where the layout comes from.

   /**
    * JDBCAppender requires a layout.
    */
   public boolean requiresLayout() {
     return true;
   }

At 19:11 10.06.2002 +0200, you wrote:
>Hi,
>
>I created a custom PatternLayout which is intended to print values of
>the custom object stored under event.getMessage. The fields are like
>user name, response time etc. I also use custom conversion characters to
>refer to these values.
>
>The only problem is that JDBC appender ignores the layout settings in
>the log4j.properties. If I set it programmatically, it's OK, if I
>override JDBCAppender.requiresLayout to return true, it's also OK.
>
>It is very annoying that the JDBC appender's SQL command would use
>custom conversion characters but the layout handler is not loaded for
>it. The result is a bunch of annoying messages:
>
>-------- Execution --------
>log4j:ERROR Unexpected char [o] at position 106 in conversion patterrn.
>log4j:ERROR Unexpected char [e] at position 112 in conversion patterrn.
>log4j:ERROR Unexpected char [u] at position 118 in conversion patterrn.
>log4j:ERROR Unexpected char [s] at position 123 in conversion patterrn.
>log4j:ERROR Unexpected char [g] at position 128 in conversion patterrn.
>log4j:ERROR Unexpected char [q] at position 134 in conversion patterrn.
>log4j:ERROR Unexpected char [o] at position 111 in conversion patterrn.
>log4j:ERROR Unexpected char [e] at position 117 in conversion patterrn.
>log4j:ERROR Unexpected char [u] at position 123 in conversion patterrn.
>log4j:ERROR Unexpected char [v] at position 129 in conversion patterrn.
>log4j:ERROR Unexpected char [g] at position 135 in conversion patterrn.
>log4j:ERROR Unexpected char [q] at position 141 in conversion patterrn.
>log4j:ERROR Unexpected char [s] at position 147 in conversion patterrn.
>
>Actually, I can't get the point why JDBC appender defines that 'it does
>not require layout'. Can you enlighten me?
>
>/Balazs

--
Ceki

SUICIDE BOMBING - A CRIME AGAINST HUMANITY
Sign the petition: http://www.petitiononline.com/1234567b
I am signatory number 22106. What is your number?


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to