logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balazs Somogyi" <balazs.somo...@FATHOMTECHNOLOGY.com>
Subject Rationale behind Appender.requiresLayout
Date Mon, 10 Jun 2002 17:11:00 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message