cancel
Showing results for 
Search instead for 
Did you mean: 

JCO3 How to set trace path or catch trace message

Former Member
0 Kudos

In old Jco can setTracePath

http://help.sap.com/javadocs/NW04/current/jc/com/sap/mw/jco/JCO.html#setTracePath(java.lang.String)

but in JCO 3 how can do that ?

I found http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/daea401675752ae10000000a155106/content.htm

*************************

JCO trace

name

JCO*.trc

location

directory j2ee/cluster/server* or defined path

how to switch on and off

set JVM options for the server via the Config Tool and restart server: -Djco.trace_level=[0-10],-Djco.trace_path=[defined_path]

********************************

any other methods?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Jacky,

Please browse the API of class com.sap.conn.jco.JCo. There is a method call setTrace.

public static void setTrace(int level, java.lang.String path)

Turns on the JCo trace. Allowed levels are [0 .. 10]. The common used are:

0 - nothing

1 - errors and warnings

2 - execution path, errors and warnings

3 - full execution path, errors and warnings

4 - execution path, info messages, errors and warnings

6 - full execution path, info messages, errors and warnings

7 - debug messages, full execution path, info messages, errors and warnings

8 - verbose debug messages, full execution path, info messages, errors and warnings

As path value null, stdout, stderr or an existing path are allowed. If path is equals null or stdout or stderr JCo will trace out to the standard output (error) stream. If at least one JCoTraceListener is registered, the trace output will be sent to the listener only. To redirect the JCo trace into a file, the path value has to be set to an existing directory.

Parameters:

level - [0 .. 10]

path - null, stdout, stderr or an existing path

Former Member
0 Kudos

Thanks Jack Xiong

Answers (0)