Re: Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)

Поиск
Список
Период
Сортировка
От Jeremy Whiting
Тема Re: Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
Дата
Msg-id 027a7987-01da-9f00-6e42-bf455fcc14c9@redhat.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: Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
Re: Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
Список pgsql-jdbc
On 09/12/16 14:14, Brad DeJong wrote:

Sergey Kim wrote:

> Brad DeJong wrote:

>> 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.

> The following fix gives solution: java.sql.DriverManager.setLogWriter(new java.io.PrintWriter(System.out));

> What should be do in order to preserve the code untouched and still have to JDBC logging available?

 

Sorry, that is a more difficult question. I am not aware of any way to set the log writer with a configuration parameter rather than by calling setLogWriter().

 

As for the change in pgjdbc behavior, I suggest creating an issue on https://github.com/pgjdbc/pgjdbc.

 


  This has been raised before. See [1].

 The advice to call setLogWriter() along with setLogLevel(...) is necessary if using the api is an option.

  That does not work for url property configuring.  I have a commit that adds the ability to load a logLevel property on the URL here [2]. Based on 1212.

Jeremy

[1]  https://github.com/pgjdbc/pgjdbc/issues/452
[2] https://github.com/whitingjr/pgjdbc/tree/logLevel2

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: [JDBC] getTypeInfo
Следующее
От: danap
Дата:
Сообщение: Re: Re: logging bug in JDBC driver(https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)