pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedlogging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
10+ messages / 4 participants
[nested] [flat]
* logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
@ 2016-12-09 09:54 Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
0 siblings, 1 reply; 10+ messages in thread
From: Sergey Kim @ 2016-12-09 09:54 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: Sergey Onuchin <sonuchin@odin.com>
Dear Community,
we upgraded our old using jdbc driver with the newest version (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) and revealed that ( loglevel) parameter doesn't produce any messages as it stated in the documentation (https://jdbc.postgresql.org/documentation/94/connect.html).
The previously using but obsolete version (postgresql-9.2-1002.jdbc4.jar) has this feature which we actively have been using for debug purposes.
Connecting to the Database - PostgreSQL JDBC Driver<https://jdbc.postgresql.org/documentation/94/connect.html;
jdbc.postgresql.org
Connecting to the Database. With JDBC, a database is represented by a URL (Uniform Resource Locator). With PostgreSQL(tm), this takes one of the following forms:
Please consider the issue.
Best Regards,
Sergey Kim
HA Arhitect / skim@odin.com
http://www.odin.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
@ 2016-12-09 13:17 ` Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
0 siblings, 1 reply; 10+ messages in thread
From: Brad DeJong @ 2016-12-09 13:17 UTC (permalink / raw)
To: Sergey Kim <skim@odin.com>; pgsql-jdbc; +Cc: Sergey Onuchin <sonuchin@odin.com>
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.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
@ 2016-12-09 13:53 ` Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
0 siblings, 1 reply; 10+ messages in thread
From: Sergey Kim @ 2016-12-09 13:53 UTC (permalink / raw)
To: Brad DeJong <Brad.Dejong@infor.com>; pgsql-jdbc; +Cc: Sergey Onuchin <sonuchin@odin.com>
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
________________________________
From: Brad DeJong <Brad.Dejong@infor.com>
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.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
@ 2016-12-09 14:14 ` Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
0 siblings, 1 reply; 10+ messages in thread
From: Brad DeJong @ 2016-12-09 14:14 UTC (permalink / raw)
To: Sergey Kim <skim@odin.com>; pgsql-jdbc; +Cc: Sergey Onuchin <sonuchin@odin.com>
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.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
@ 2016-12-15 16:03 ` Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 17:29 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) danap <danap@itstriangle.com>
2016-12-15 18:47 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
0 siblings, 2 replies; 10+ messages in thread
From: Jeremy Whiting @ 2016-12-15 16:03 UTC (permalink / raw)
To: Brad DeJong <Brad.Dejong@infor.com>; Sergey Kim <skim@odin.com>; +Cc: pgsql-jdbc; Sergey Onuchin <sonuchin@odin.com>
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
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
@ 2016-12-15 17:29 ` danap <danap@itstriangle.com>
2016-12-16 13:31 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
1 sibling, 1 reply; 10+ messages in thread
From: danap @ 2016-12-15 17:29 UTC (permalink / raw)
To: Jeremy Whiting <jwhiting@redhat.com>; pgsql-jdbc
Jeremy Whiting wrote:
> 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
Are any of the other url property configuring settings still working
since changes that broke loglevel, ex. ssh, etc.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 17:29 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) danap <danap@itstriangle.com>
@ 2016-12-16 13:31 ` Jeremy Whiting <jwhiting@redhat.com>
0 siblings, 0 replies; 10+ messages in thread
From: Jeremy Whiting @ 2016-12-16 13:31 UTC (permalink / raw)
To: danap <danap@itstriangle.com>; pgsql-jdbc
On 15/12/16 17:29, danap wrote:
> Jeremy Whiting wrote:
>
>> 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
>
> Are any of the other url property configuring settings still working
> since changes that broke loglevel, ex. ssh, etc.
>
>
Back when PR452 was proposed only logging was affected. A refactoring
effort in PR407 stripped out this line
https://github.com/pgjdbc/pgjdbc/pull/407/files#diff-5a70ae121bb9bd3ff288a7f879b0f853L1295
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
@ 2016-12-15 18:47 ` Sergey Kim <skim@odin.com>
2016-12-16 13:34 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
1 sibling, 1 reply; 10+ messages in thread
From: Sergey Kim @ 2016-12-15 18:47 UTC (permalink / raw)
To: Jeremy Whiting <jwhiting@redhat.com>; Brad DeJong <Brad.Dejong@infor.com>; +Cc: pgsql-jdbc; Sergey Onuchin <sonuchin@odin.com>
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<https://github.com/pgjdbc/pgjdbc/blob/master/p...;
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 18:47 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
@ 2016-12-16 13:34 ` Jeremy Whiting <jwhiting@redhat.com>
2016-12-18 19:41 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Whiting @ 2016-12-16 13:34 UTC (permalink / raw)
To: Sergey Kim <skim@odin.com>; +Cc: Brad DeJong <Brad.Dejong@infor.com>; pgsql-jdbc; Sergey Onuchin <sonuchin@odin.com>
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
>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar)
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 18:47 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-16 13:34 ` Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Jeremy Whiting <jwhiting@redhat.com>
@ 2016-12-18 19:41 ` Sergey Kim <skim@odin.com>
0 siblings, 0 replies; 10+ messages in thread
From: Sergey Kim @ 2016-12-18 19:41 UTC (permalink / raw)
To: Jeremy Whiting <jwhiting@redhat.com>; +Cc: Brad DeJong <Brad.Dejong@infor.com>; pgsql-jdbc; Sergey Onuchin <sonuchin@odin.com>
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
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2016-12-18 19:41 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-09 09:54 logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) Sergey Kim <skim@odin.com>
2016-12-09 13:17 ` Brad DeJong <Brad.Dejong@infor.com>
2016-12-09 13:53 ` Sergey Kim <skim@odin.com>
2016-12-09 14:14 ` Brad DeJong <Brad.Dejong@infor.com>
2016-12-15 16:03 ` Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 17:29 ` danap <danap@itstriangle.com>
2016-12-16 13:31 ` Jeremy Whiting <jwhiting@redhat.com>
2016-12-15 18:47 ` Sergey Kim <skim@odin.com>
2016-12-16 13:34 ` Jeremy Whiting <jwhiting@redhat.com>
2016-12-18 19:41 ` Sergey Kim <skim@odin.com>
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