pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey Kim <skim@odin.com>
To: Jeremy Whiting <jwhiting@redhat.com>
Cc: Brad DeJong <Brad.Dejong@infor.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Cc: Sergey Onuchin <sonuchin@odin.com>
Subject: Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
Date: Sun, 18 Dec 2016 19:41:17 +0000
Message-ID: <DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com> (raw)
In-Reply-To: <c5f489a1-3e37-438b-67da-560299a6de35@redhat.com>
References: <DM2PR0201MB06872D7006FD56357193ACBFA5870@DM2PR0201MB0687.namprd02.prod.outlook.com>
	<F8F0ED16CB59F247B7EFD0E1DB34BC1F5CB5D4D6@USALWEXMBX3.infor.com>
	<DM2PR0201MB06879F1541795D1641DE23FCA5870@DM2PR0201MB0687.namprd02.prod.outlook.com>
	<F8F0ED16CB59F247B7EFD0E1DB34BC1F5CB5D51D@USALWEXMBX3.infor.com>
	<027a7987-01da-9f00-6e42-bf455fcc14c9@redhat.com>
	<BN1PR0201MB06743068EE85D51065E8F307A59D0@BN1PR0201MB0674.namprd02.prod.outlook.com>
	<c5f489a1-3e37-438b-67da-560299a6de35@redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Hi Jeremy,



ok, probably the decision is correct but I see there should be remarks done in the  documentation.


We still see messages that is attempts to log messages in null appender. Why not to log into standard common log. For instance the java.util.logging could be used here.


Best Regards,

Sergey.

________________________________
From: Jeremy Whiting <jwhiting@redhat.com>
Sent: Friday, December 16, 2016 4:34:02 PM
To: Sergey Kim
Cc: Brad DeJong; 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)

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><mailto:jwhiting@redhat.com>
Sent: Thursday, December 15, 2016 7:03:20 PM
To: Brad DeJong; Sergey Kim
Cc: pgsql-jdbc@postgresql.org<mailto: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

view thread (10+ messages)

Message-ID: <DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com>
Permalink:  ../DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com/
Also on:    postgresql.org/message-id/DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: skim@odin.com, jwhiting@redhat.com, Brad.Dejong@infor.com, sonuchin@odin.com
  Subject: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
  In-Reply-To: <DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com>
  References: <DM2PR0201MB06872D7006FD56357193ACBFA5870@DM2PR0201MB0687.namprd02.prod.outlook.com> <F8F0ED16CB59F247B7EFD0E1DB34BC1F5CB5D4D6@USALWEXMBX3.infor.com> <DM2PR0201MB06879F1541795D1641DE23FCA5870@DM2PR0201MB0687.namprd02.prod.outlook.com> <F8F0ED16CB59F247B7EFD0E1DB34BC1F5CB5D51D@USALWEXMBX3.infor.com> <027a7987-01da-9f00-6e42-bf455fcc14c9@redhat.com> <BN1PR0201MB06743068EE85D51065E8F307A59D0@BN1PR0201MB0674.namprd02.prod.outlook.com> <c5f489a1-3e37-438b-67da-560299a6de35@redhat.com> <DM2PR0201MB06873D91C398DAFEBBA2F602A59E0@DM2PR0201MB0687.namprd02.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox