Lots of junk on my console

Поиск
Список
Период
Сортировка
Искать

Lots of junk on my console

От:
Joseph S <jks@selectacast.net>
Дата:
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") 

Re: Lots of junk on my console

От:
Kris Jurka <books@ejurka.com>
Дата:


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

Re: Lots of junk on my console

От:
Joseph S <jks@selectacast.net>
Дата:
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

Re: Lots of junk on my console

От:
Joseph S <jks@selectacast.net>
Дата:
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.

Re: Lots of junk on my console

От:
Kris Jurka <books@ejurka.com>
Дата:


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

Re: Lots of junk on my console

От:
Joseph S <jks@selectacast.net>
Дата:
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.

FAQ