db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veaceslav Chicu ...@infologic.fr>
Subject Re: jdbc trace
Date Wed, 03 Aug 2005 14:33:51 GMT
it's ok
can I redirect this information to console?

I have:

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
Connection conn = DriverManager.getConnection("jdbc:derby:bookstoredb;",
"slavic", "cs");
DriverManager.setLogWriter(new PrintWriter(new
FileOutputStream("trace.txt")));

why trace.txt is empty? why I don't see log information there?

http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.pd.doc/pd/t0020709.htm
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/ad/cjvjctrc.htm

thank you,
Slavic




Francois Orsini wrote:
> Yes, derby.language.logStatementText database property is very likely
> what you want...will dump text and parameter values of all executed
> statements as well as write commits and rollbacks tracing info (if I
> remember correctly)...
> 
> Derby log file (derby.log) info be found here:
> http://incubator.apache.org/derby/docs/devguide/cdevdvlp25889.html
> 
> --francois
> 
> On 8/2/05, Veaceslav Chicu <cs@infologic.fr> wrote:
> 
>>Hi Stanley,
>>
>>I want all sql messages, parameteres, commit/rollback
>>
>>I tried DriverManager.setLogWriter(new ...) with no succes
>>
>>maybe derby.language.logStatementText=true should help me?
>>
>>where is information log file?
>>
>>thank you,
>>Slavic
>>
>>
>>Stanley Bradbury wrote:
>>
>>>Hi Slavic -
>>>
>>>I'm going to guess that by trace messages you mean the messages that
>>>normally are written to the derby.log file.  There are two methods that
>>>can be used redirect Derby messages.  These are:
>>>derby.stream.error.method  and
>>>derby.stream.error.field
>>>
>>>They were omitted in the initial version 10 documentation - you can read
>>>about them in the 10.1 manuals posted on the Apache Incubator site for
>>>derby
>>>
>>>I can get all derby.log messages sent to the terminal by setting ..field
>>>to java.lang.System.out
>>>I.E.
>>>java -Dderby.stream.error.field=java.lang.System.out
>>>org.apache.derby.tools.ij
>>>
>>>Please post again and let me know if this is the information you needed
>>>or correct my assumption on the meaning of  'trace messages' and I will
>>>try again.
>>>
>>>Veaceslav Chicu wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>how can I write all trace messages to console?
>>>>System.out
>>>>
>>>>thank you,
>>>>Slavic
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
> 


Mime
View raw message