Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHseG-0003dJ-Go for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 Dec 2016 13:34:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cHseG-0001tm-3s for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 Dec 2016 13:34:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cHseF-0001tg-Gx for pgsql-jdbc@postgresql.org; Fri, 16 Dec 2016 13:34:07 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cHseC-0002fR-Si for pgsql-jdbc@postgresql.org; Fri, 16 Dec 2016 13:34:06 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E8688FD02; Fri, 16 Dec 2016 13:34:04 +0000 (UTC) Received: from [10.42.17.42] ([10.42.17.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBGDY2hx020578; Fri, 16 Dec 2016 08:34:03 -0500 Subject: Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) To: Sergey Kim References: <027a7987-01da-9f00-6e42-bf455fcc14c9@redhat.com> Cc: Brad DeJong , "pgsql-jdbc@postgresql.org" , Sergey Onuchin From: Jeremy Whiting Message-ID: Date: Fri, 16 Dec 2016 13:34:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------4E94C8C4D316AAF13A60829C" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 16 Dec 2016 13:34:04 +0000 (UTC) X-Pg-Spam-Score: -10.0 (----------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------4E94C8C4D316AAF13A60829C Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Hi Sergey, The bad news is this will not be going into the mainline. I've had the discussion in the past. The community decision at the time was devs should do a local build to set a PrintWriter. I bear no grudges btw on this decision. There are compelling reasons for it. So no, it won't be in any Maven repo any time soon. It exists on a branch on GitHub. Floating in the digital ether going nowhere. But you are welcome to copy and paste the code to build your own driver artifact. Regards, Jeremy On 15/12/16 18:47, Sergey Kim wrote: > > Hi Jeremy, > > > thank you for the good news. > > But will it able to receive the compiled version of the driver? Also > it seems it should be published in public maven repositories. Right? > > > > Best Regards, > Sergey Kim > > ------------------------------------------------------------------------ > *From:* Jeremy Whiting > *Sent:* Thursday, December 15, 2016 7:03:20 PM > *To:* Brad DeJong; Sergey Kim > *Cc:* pgsql-jdbc@postgresql.org; Sergey Onuchin > *Subject:* Re: [JDBC] Re: logging bug in JDBC driver > (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) > > 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 > --------------4E94C8C4D316AAF13A60829C Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
Hi Sergey,
 The bad news is this will not be going into the mainline. I've had the discussion in the past. The community decision at the time was devs should do a local build to set a PrintWriter. I bear no grudges btw on this decision. There are compelling reasons for it.

 So no, it won't be in any Maven repo any time soon.
 It exists on a branch on GitHub. Floating in the digital ether going nowhere. But you are welcome to copy and paste the code to build your own driver artifact.

Regards,
Jeremy

On 15/12/16 18:47, Sergey Kim wrote:

Hi Jeremy,


thank you for the good news.

But will it able to receive the compiled version of the driver? Also it seems it should be published in public maven repositories. Right?



Best Regards,
Sergey Kim


From: Jeremy Whiting <jwhiting@redhat.com>
Sent: Thursday, December 15, 2016 7:03:20 PM
To: Brad DeJong; Sergey Kim
Cc: pgsql-jdbc@postgresql.org; Sergey Onuchin
Subject: Re: [JDBC] Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
 
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



--------------4E94C8C4D316AAF13A60829C--