cancel
Showing results for 
Search instead for 
Did you mean: 

Logging Questions

Former Member
0 Kudos

I have deployed a J2EE application that writes logging messages to standard out. Can someone tell me what file stdout log messages from a J2EE application are written to? I have looked in the JP1\JC00\work directory where there are several files that look like stdout (jvm_server0.out, dev_server0.out, std_server0.out) but none of these files contain my output. Is there something I need to configure?

Also, is there any documentation on loggging? Like what files contain what logging information? How to configure logging? How to integrate log4j with SAP EE 5?

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Kyle,

Welcome on SDN!

> I have deployed a J2EE application that writes

> logging messages to standard out. Can someone tell

> me what file stdout log messages from a J2EE

> application are written to?

That would be JP1JC00j2eeclusterserver0logdefaultTrace.n.trc.

> Also, is there any documentation on loggging? Like

> what files contain what logging information? How to

> configure logging?

Yes, have a look at the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a">Administration Guide</a>, from page 107 right to the EOF.

> How to integrate log4j with SAP EE 5?

SAP Java EE 5 server uses the SAP Logging API, which (<a href="/people/david.beisert/blog/2003/11/05/building-blocks-needed-in-every-java-application">not only my opinion</a>) is more powerful than log4j. It's also described in the Administration Guide, javadocs available <a href="https://help.sap.com/javadocs/NW04S/current/en/index.html">here</a>.

Hope it helps!

-Vladimir

Former Member
0 Kudos

The file you mentioned

JP1\JC00\j2ee\cluster\server0\log\defaultTrace.n.trc

doesn't contain my log output either. The file looks very SAPpy - meaning it has a lot of SAP output with SAP log information,

Any other ideas?

I'm thinking you should be able to get your System.out.println output straight "out of the box" without extra configuration settings. I'm sure I must just be missing it somewhere.

As for log4j, it wouldn't be feasible to switch. We are trying to port our application from JBoss to SAP but we have alot of code that contains log4j logging logic.

Vlado
Advisor
Advisor
0 Kudos

Hi Kyle,

> The file you mentioned

> JP1\JC00\j2ee\cluster\server0\log\defaultTrace.n.trc

> doesn't contain my log output either. The file looks

> very SAPpy - meaning it has a lot of SAP output with

> SAP log information,

>

> Any other ideas?

>

> I'm thinking you should be able to get your

> System.out.println output straight "out of the box"

> without extra configuration settings. I'm sure I

> must just be missing it somewhere.

blog. I'd just suggest that instead of:


InputStream is = ClassLoader.getSystemResourceAsStream("apps/sap.com/LogApplication/servlet_jsp/myApplication/root/WEB-INF/properties/LoggerImpl.properties");

you write:


InputStream is = getClass().getClassLoader().getResourceAsStream("WEB-INF/properties/LoggerImpl.properties");

within your application code.

The rest is just to add the log4j.jar into your application EAR file.

HTH!

-Vladimir

Former Member
0 Kudos

Thanks Vladimir! Both of your links you provided solved the problem.

Answers (0)