cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure logging for enterprise application

Former Member
0 Kudos

Hello *,

there is a lot of information for the log configuration file as well as for the logging api. But I still miss the link between these two.

After I've set up the log-configuration.xml in the Developer Studio, how do I actually access the setup in a java file (here an EJB)?

Thanks for any help!

Regards

Martin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Benny,

thanks for the link.

I've set up a log configuration in an EAR project according to the documentation and put a few trace statements into the EJB's code. Alas, no output.

My suspicion is that I must tell the log library to use a certain configuration (the one I've defined) like I would do with a properties file containing such a configuration.

Is this correct or am I totally wrong here?

Regards

Martin

Former Member
0 Kudos

Hi Martin,

please have a look at the following documentation: http://help.sap.com/saphelp_nw04/helpdata/en/e2/f410409f088f5ce10000000a155106/content.htm

You have to configure the logging additionally using the Visual Admin or the Admin console to "activate" output of your server application.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

How to enble logging for J2EE application?

I see my log Controller in Visual Admin. But I couldn't find the way to activate it. Logs are not written to a file. Could not find anything in the help doc.

Andrei.

Here is log.properties

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">

<log-configuration>

<log-formatters>

<log-formatter

name="DefaultFormatter"

type="TraceFormatter"/>

</log-formatters>

<log-destinations>

<log-destination

count="10"

effective-severity="ALL"

limit="1000000"

name="XVIP_LOG" pattern="./log/applications/xvip_app/app.log"

type="FileLog">

<formatter-ref

name="DefaultFormatter"/>

</log-destination>

</log-destinations>

<log-controllers>

<log-controller

effective-severity="ALL"

maximum-severity="FATAL"

minimum-severity="ALL" name="/Applications/XVIP/NotifLogger">

<associated-destinations>

<destination-ref

association-type="LOG"

name="XVIP_LOG"/>

</associated-destinations>

</log-controller>

</log-controllers>

</log-configuration>

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is a complete API about logging, which you can check here: http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/log/index.html

Tha manualy also describe it in the help portal.

Regards,

Benny