Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Nicholas Williams
You can certainly implement your own appender. Reading the Log4j documentation and perusing the source code should help you get started. You cannot, however, create a custom implementation of inserting messages into the database. If you have a suggestion of how the JDBC appender could be improved,

Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Nicholas Williams
There won't ALWAYS be a problem, but there will be performance concerns and there could SOMETIMES be a problem. Since your columns are non-Unicode, PostgreSQL (either the database engine or the JDBC driver) will convert the Unicode Strings to whatever character set your columns are in when it inser

Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Betty User
One more question if I can - Is there some way or reason to implement own appender and process Log4J messages in my way? After all, there is no problem with inserting unicode strings into a PostgreSQL database via PostgreSQL JDBC 4 driver (or com.jolbox.bonecp.BoneCPDataSource datasource in my case

Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Betty User
Hi Nick, agreed, this issue is related to poor implementation of PostgreSQL JDBC 4. Unfortunately there is no way how to change PostgreSQL to another database. I tried it and it works with isUnicode="false". But event logs are in unicode, shouldn't be there some problem during saving unicode even

Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Nick Williams
Actually I need to correct myself: On Jul 16, 2013, at 7:57 AM, Nick Williams wrote: > M., > > setNString() is part of JDBC 4.0, which came with Java 6. It sounds like you > are using the postgresql-x.x-.jdbc3.jar JDBC driver, which was written > for Java 4. Please download the latest JDBC

Re: Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Nick Williams
M., setNString() is part of JDBC 4.0, which came with Java 6. It sounds like you are using the postgresql-x.x-.jdbc3.jar JDBC driver, which was written for Java 4. Please download the latest JDBC driver postgresql-9.2-1003.jdbc4.jar (http://jdbc.postgresql.org/download/postgresql-9.2-1003.j

Log4j 2 - Not implemented method used in JDBC appender

2013-07-16 Thread Betty User
Hello, I am trying to log Log4j 2 events into PostgreSQL database via JDBC appender with datasource (com.jolbox.bonecp.BoneCPDataSource). This data source uses JDBC driver for PostgreSQL (postgresql-9.2-1003.jdbc4.jar) but there isn't implemented method org.postgresql.jdbc4.Jdbc4PreparedStatement