pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Lots of junk on my console
6+ messages / 2 participants
[nested] [flat]

* Lots of junk on my console
@ 2007-03-28 00:45  Joseph S <jks@selectacast.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Joseph S @ 2007-03-28 00:45 UTC (permalink / raw)
  To: pgsql-jdbc

Is there anyway I can turn off these annoying messages?

DriverManager.getConnection("jdbc:postgresql:xxx")
     trying 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
getConnection returning 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
DriverManager.getConnection("jdbc:postgresql:xxx")
     trying 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
getConnection returning 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
DriverManager.getConnection("jdbc:postgresql:xxx")
     trying 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
getConnection returning 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
SQLWarning:
DriverManager.getConnection("jdbc:postgresql:xxx")
     trying 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
getConnection returning 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
SQLWarning:
SQLWarning:
SQLWarning:
DriverManager.getConnection("jdbc:postgresql:xxx")
     trying 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
getConnection returning 
driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
DriverManager.getConnection("jdbc:postgresql:xxx") 



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Lots of junk on my console
@ 2007-03-29 14:37  Kris Jurka <books@ejurka.com>
  parent: Joseph S <jks@selectacast.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Kris Jurka @ 2007-03-29 14:37 UTC (permalink / raw)
  To: Joseph S <jks@selectacast.net>; +Cc: pgsql-jdbc



On Tue, 27 Mar 2007, Joseph S wrote:

> Is there anyway I can turn off these annoying messages?
>
> DriverManager.getConnection("jdbc:postgresql:xxx")
>    trying 
> driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
> getConnection returning

These messages are produced by the JVM itself and are the result of 
issuing a DriverManager.setLogWriter call.  The only way to suppress these 
is to avoid the setLogWriter call or to setLogWriter(null).

Kris Jurka



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Lots of junk on my console
@ 2007-03-29 20:41  Joseph S <jks@selectacast.net>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Joseph S @ 2007-03-29 20:41 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

I append ?loglevel=1 to the db connection urls I use for running VACUUM 
commands.  Would that set the logwriter?

Kris Jurka wrote:
> 
> 
> On Tue, 27 Mar 2007, Joseph S wrote:
> 
>> Is there anyway I can turn off these annoying messages?
>>
>> DriverManager.getConnection("jdbc:postgresql:xxx")
>>    trying 
>> driver[className=org.postgresql.Driver,org.postgresql.Driver@2c766a24]
>> getConnection returning
> 
> These messages are produced by the JVM itself and are the result of 
> issuing a DriverManager.setLogWriter call.  The only way to suppress 
> these is to avoid the setLogWriter call or to setLogWriter(null).
> 
> Kris Jurka




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Lots of junk on my console
@ 2007-03-29 20:55  Joseph S <jks@selectacast.net>
  parent: Joseph S <jks@selectacast.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Joseph S @ 2007-03-29 20:55 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

Joseph S wrote:
> I append ?loglevel=1 to the db connection urls I use for running VACUUM 
> commands.  Would that set the logwriter?
> 
Actually I see that it does.  The comment in AbstractJdbc2Connection reads:

         // Read loglevel arg and set the loglevel based on this value;
         // In addition to setting the log level, enable output to
         // standard out if no other printwriter is set

So I guess I have to set it back to null each time I create a db connection.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Lots of junk on my console
@ 2007-03-29 21:13  Kris Jurka <books@ejurka.com>
  parent: Joseph S <jks@selectacast.net>
  0 siblings, 1 reply; 6+ messages in thread

From: Kris Jurka @ 2007-03-29 21:13 UTC (permalink / raw)
  To: Joseph S <jks@selectacast.net>; +Cc: pgsql-jdbc



On Thu, 29 Mar 2007, Joseph S wrote:

> Joseph S wrote:
>> I append ?loglevel=1 to the db connection urls I use for running VACUUM 
>> commands.  Would that set the logwriter?
>> 
> Actually I see that it does.  The comment in AbstractJdbc2Connection reads:
>
>        // Read loglevel arg and set the loglevel based on this value;
>        // In addition to setting the log level, enable output to
>        // standard out if no other printwriter is set
>
> So I guess I have to set it back to null each time I create a db connection.
>

Perhaps you should avoid using loglevel=1 if you don't want any logging 
output.  If you want to get VACUUM details that should be available in a 
SQLWarning attached to the statement and should be easier to put where you 
want than something that is dumped to stdout.

Kris Jurka



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Lots of junk on my console
@ 2007-03-29 21:29  Joseph S <jks@selectacast.net>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Joseph S @ 2007-03-29 21:29 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

Kris Jurka wrote:
> 
> 

> Perhaps you should avoid using loglevel=1 if you don't want any logging 
> output.  If you want to get VACUUM details that should be available in a 
> SQLWarning attached to the statement and should be easier to put where 
> you want than something that is dumped to stdout.

In older versions of the driver they were in the SQLWarning only if I 
set loglevel=1.  I see that isn't the case now, so I'll disable it. 
Thanks for your help.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2007-03-29 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-28 00:45 Lots of junk on my console Joseph S <jks@selectacast.net>
2007-03-29 14:37 ` Kris Jurka <books@ejurka.com>
2007-03-29 20:41   ` Joseph S <jks@selectacast.net>
2007-03-29 20:55     ` Joseph S <jks@selectacast.net>
2007-03-29 21:13       ` Kris Jurka <books@ejurka.com>
2007-03-29 21:29         ` Joseph S <jks@selectacast.net>

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