Bill,

      // Use JNDI lookup to locate the data source:
      InitialContext ctx = new InitialContext(System.getProperties());
      DataSource ds = (DataSource)ctx.lookup(dsName);

      // Have the connection pool log to the specified log file:
      ds.setLogWriter(myPrintWriter);

Where dsName is the name of your datasource (as specified in
data-sources.xml) and myPrintWriter is a java.io.PrintWriter object which
writes to the log file of your choice.

    Hope this helps,

    Attila


----- Original Message -----
From: "Bill Clinton" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 4:37 PM
Subject: Datasource Question - is there a way to setup a JDBC log file?


> Hello,
>    I am curious on how to set up logging for JDBC.  I thought there
> would be a parameter in the data-source definition that would allow
> logging.  Does this exist?
>
> Bill
>
> btw: I am using oracle
>
>
>


Reply via email to