Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Gary Gregory
On Thu, Aug 22, 2013 at 6:32 PM, Nick Williams < nicho...@nicholaswilliams.net> wrote: > Well we don't need what's currently provided with those legacy classes, > because a different approach was taken with this JDBCAppender to handle ID > columns. > > I have several problems with this approach: >

Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Nick Williams
Well we don't need what's currently provided with those legacy classes, because a different approach was taken with this JDBCAppender to handle ID columns. I have several problems with this approach: 1) The implementation would be far more complicated, because the dialects would have to be used

Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Scott Deboy
That doesn't look like much work. Particularly since you could lift what's provided and just extend it to support the one-off we're talking about here, yes? On 8/22/13, Nick Williams wrote: > Yes, I mean like that. I want to avoid something like that. > > N > > On Aug 22, 2013, at 4:59 PM, Scott

Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Nick Williams
Yes, I mean like that. I want to avoid something like that. N On Aug 22, 2013, at 4:59 PM, Scott Deboy wrote: > You mean like: > http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/db/dialect/package-summary.html > > Scott > > On 8/22/13, Nick Williams wrote: >> IMO,

Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Scott Deboy
You mean like: http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/db/dialect/package-summary.html Scott On 8/22/13, Nick Williams wrote: > IMO, this is a bug in the PGSQL JDBC driver and not something that Log4j can > easily (or should) address. For a detailed discussi

Re: Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Nick Williams
IMO, this is a bug in the PGSQL JDBC driver and not something that Log4j can easily (or should) address. For a detailed discussion, see the PGSQL thread about casting text to PGSQL enums [1]. The problem lies in PGSQL's type handling. With PGSQL, MySQL, and any other database type that supports

Log4j2: Column casting in JDBCAppender

2013-08-22 Thread Peter Rifel
Hello, I'm wondering if it is at all possible to cast columns to a certain type (a custom enum) with the JDBCAppender. I have an existing PostgreSQL database that I send all warnings and errors to and the log level is currently being stored as an enum. When I try and log to the database I get