cancel
Showing results for 
Search instead for 
Did you mean: 

how to log in standard sap way in a jsp/servlet project

Former Member
0 Kudos

Hi expert,

To log and trace in sap standard mechanism always confuse me a lot.

Is there any how-to document for j2ee project?

I know for wdj you can add log configuration by select 'create log configuration file' in context menu, but I can not find this for a j2ee project.

I would like to see the log in LogViewer of VA, put all logs together in sap management make sense in our project.

Thank you for your hints.

William

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

f

ile=new FileLog("f:/WebServiceTrace/trace2.%g.log", 800000, 10,                                        new  TraceFormatter());

The above code specifies the path for your log file.

Then add this file as a log location and then log the traces. For this you can use the following code like:

Location location=Location.getLocation(className);
		location.addLog(file);
		location.setEffectiveSeverity(Severity.ALL);
		location.entering(methodName);

Answers (1)

Answers (1)

Former Member
0 Kudos

any idea?