Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
От | Sergey Kim |
---|---|
Тема | Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) |
Дата | |
Msg-id | DM2PR0201MB06879F1541795D1641DE23FCA5870@DM2PR0201MB0687.namprd02.prod.outlook.com обсуждение исходный текст |
Ответ на | [JDBC] Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) (Brad DeJong <Brad.Dejong@infor.com>) |
Ответы |
Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
|
Список | pgsql-jdbc |
Dear Brad DeJong,
in stdlog we see messages:
log4j:ERROR Attempted to append to closed appender named [null].
The following fix gives solution: java.sql.DriverManager.setLogWriter(new java.io.PrintWriter(System.out));
But it is related to the code modification routines.
What should be do in order to preserve the code untouched and still have to JDBC logging available? We just replaced the driver.
Best Regards,
Sergey Kim
Sent: Friday, December 9, 2016 4:17:44 PM
To: Sergey Kim; pgsql-jdbc@postgresql.org
Cc: Sergey Onuchin
Subject: RE: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
Sergey Kim wrote:
> ... (loglevel) parameter doesn't produce any messages ...
Please verify that your application calls java.sql.DriverManager.setLogWriter(PrintWriter) to set the log destination.
I just tested loglevel in PostgreSQL JDBC Driver 42.0.0.SNAPSHOT and including loglevel=2 in the JDBC connection string sets the loglevel correctly but the driver will only log messages if there is a valid LogWriter.
В списке pgsql-jdbc по дате отправления: