fix:Do not set the loglevel when instantiating a connection it is set… #407
Conversation
… when the Driver starts
This fixes a problem where Driver.setLogLevel has no effect as the property over rides the value. One thing it does change is that it doesn't automatically set the LogWriter to stdout. Suggestions on how/if to handle this ? |
fix:Do not set the loglevel when instantiating a connection it is set…
This comment has been minimized.
This comment has been minimized.
whitingjr
commented on org/postgresql/jdbc2/AbstractJdbc2Connection.java
in 84b28eb
Dec 1, 2015
Removing this line causes all debug logging to be turned off when using a DataSource. This makes low level debugging far more difficult. |
This comment has been minimized.
This comment has been minimized.
Ah, right, now I recall. If you do something like org.postgresql.Driver.setLogLevel. this line reverts that change unless you have the property externally set as per your DataSource configuration |
This comment has been minimized.
This comment has been minimized.
Interesting catch-22 it caused debugging to be turned off when not using a DataSource |
hmm yes interesting.
|
Yes, that would work for me |
Ok I'll create an issue #436 and a PR. We can see what you think of the proposed changes. |
This comment has been minimized.
This comment has been minimized.
whitingjr
commented on org/postgresql/jdbc2/AbstractJdbc2Connection.java
in 84b28eb
Dec 8, 2015
with this line removed the DriverManager.logWriter object is always null. which disables info/debug logging. |
… when the Driver starts