You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Erlend Birkenes <er...@birkenes.net> on 2008/04/21 22:59:49 UTC

How do I print to derby.log?

Hi.

I'm working on *DERBY-3618<https://issues.apache.org/jira/browse/DERBY-3618>
* and I can't figure out how to print to derby.log. Is there an easy way to
get hold of the PrintWriter for the log?

Thanks.
-Erlend



**

Re: How do I print to derby.log?

Posted by Tiago Espinha <ti...@espinhas.net>.
Hi Erlend,

I'm not sure about this, but I believe you can do so with the following
code:
PrintWriter logWriter = Monitor.getStream().getPrintWriter();

and you need this:
import org.apache.derby.iapi.services.monitor.Monitor;

Regards,
Tiago

On Mon, Apr 21, 2008 at 9:59 PM, Erlend Birkenes <er...@birkenes.net>
wrote:

> Hi.
>
> I'm working on *DERBY-3618<https://issues.apache.org/jira/browse/DERBY-3618>
> * and I can't figure out how to print to derby.log. Is there an easy way
> to get hold of the PrintWriter for the log?
>
> Thanks.
> -Erlend
>
>
>
> **

Re: How do I print to derby.log?

Posted by Mamta Satoor <ms...@gmail.com>.
I am taking the liberty to copy Dyre's email on Feb 29th '08 about how
to print into log file

"On the server, you can use the Monitor.logMessage system to write
messages directly to derby.log. You can also use the
SanityManager.DEBUG_ON("mydebugflag") predicate if you only want to/need
to see the debug when you run with that flag.

In the client you can use the agent.trace() system which will log to a
separate trace file."

Hope this helps you,
Mamta


On 4/21/08, Erlend Birkenes <er...@birkenes.net> wrote:
> Hi.
>
> I'm working on DERBY-3618 and I can't figure out how to print to derby.log.
> Is there an easy way to get hold of the PrintWriter for the log?
>
> Thanks.
> -Erlend
>
>
>
>