Skip to Content
author's profile photo Former Member
Former Member

How to configure logging for enterprise application

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

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 04, 2004 at 03:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 05, 2004 at 07:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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>