Re: JDBC Logging & log4j

From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
To: "'Serguei Mokhov'" <mokhov(at)cs(dot)concordia(dot)ca>, <pgsql-jdbc(at)postgresql(dot)org>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: JDBC Logging & log4j
Date: 2002-03-22 19:46:17
Message-ID: 028c01c1d1da$3bf06310$807ba8c0@inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Sergui,

Actually I think I like this option and all that is really required is
something like

//DEBUG Driver.debug(message)

Then it would compile properly and if you wanted you could enable the
debug statements with a regex of some sort

Dave

> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Serguei Mokhov
> Sent: Saturday, March 16, 2002 4:40 PM
> To: Dave(at)micro-automation(dot)net; pgsql-jdbc(at)postgresql(dot)org
> Cc: 'Bruce Momjian'
> Subject: Re: [JDBC] JDBC Logging & log4j
>
>
> ----- Original Message -----
> From: "Dave Cramer" <Dave(at)micro-automation(dot)net>
> Sent: Saturday, March 16, 2002 4:15 PM
>
> > Do we want to put logging in the driver?
> > Why?
> > How much?
> > At what cost?
>
> Needless to say, logging is essential thing to have,
> but to answer the above questions one answer could be - to
> try. If those who care about the logging facilities, could
> simply mirror current dev. tree of the driver, and some in,
> and compare performance between the two on the same set of tests.
>
> Another possible solution just came into my
> not-always-so-smart-head, is to write some pre-processing
> ourselves :). Put some special types of comments in the
> places where the logging seems appropriate like:
>
> //{DEBUG
>
> logSmthHere();
>
> //}DEBUG
>
> Just a simple {PERL, Shell, Python, whatever}-script may run
> through the sources and produce two jars, one compiled with
> DEBUG as it is, the other one will be a stripped out //{DEBUG
> version. Yes, I know this will require some tmp space and
> some extra processing, but could be a solution too.
>
> 2 Canadian cents
>
> -s
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Cabanero 2002-03-23 00:58:53 Weird connection problems with SQLExceptions being thrown
Previous Message Gonzalo Aranda 2002-03-22 13:19:34 THANKS!!