Log-configuration.xml How to use it

I am trting to use the logging xcapabilities by usinmg log-configuration.xml but is unable to do so by simply configuring it. If I do using using coding i.e by adding in code location and filelog in code I am able to log. But instead of it I am more intrested to use log-configuration.xml. So please provide me with exact steps that need to be done for configuraing it rightly with category defined as well and using a fileLog as an example.

I am trting to use the logging xcapabilities by usinmg log-configuration.xml but is unable to do so by simply configuring it. If I do using using coding i.e by adding in code location and filelog in code I am able to log. But instead of it I am more intrested to use log-configuration.xml. So please provide me with exact steps that need to be done for configuraing it rightly with category defined as well and using a fileLog as an example.

Similar Messages

  • Pi 7.1 ehp1 log-configuration.xml, howto create/edit in NWDS?

    Hello,
    In NWDS 2.0 You have a special mode in NWDS  to edit the file. You get tabs with Log Formatter, Log Destination, Log Controller and Source.
    How does it work in NWDS 7.1 EHP1?
    The log-configuration shipped with the example module is packed inside the sample adapter module jar. This seems not right? It should be in the ear?
    In nwds I create an ear, and then use the nwpacktool to repack it as an sda to be able to deploy with jspm. There is a firewall so I can't deploy from nwds.
    I'm building an adapter module. It works fine besides that the logcontroller doesn't display in the nwa, and I can't set the log levels.
    I've tried placing the log-configuration.xml both in the META-INF of the jar and the META-INF of the ear but it still doesn't work.
    Thanks for your help.
    Best regards
    Otto Frost

    Hello,
    The NWDS 7.1 EHP1 doesn't recognize the file in the META-INF.
    In 7.11 the log-configuration.xml isn't used anymore according to SAP.
    When the module is started the tracing location is displayed in the log-configurator automagically.
    My module wasn't started after deployment.
    To start it I had to go into the NWA - Operation Management -
    Systems - Start&Stop - Java EE applications - myPiModule
    It was stopped, but started up when I clicked the "Logs" link.
    After this it is visible in the tracing locations in the nwa log configurator.
    Best regards
    Otto Frost

  • How to log to a file using the log-configuration.xml?

    Hello *,
    I created following log-configuration.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
         <log-formatters>
              <log-formatter name="DefaultFormatter" pattern="%25d %-60l %s: %m" type="TraceFormatter"/>
         </log-formatters>
         <log-destinations>
              <log-destination count="10" effective-severity="ALL" limit="1000000" name="DefaultDestination" pattern="FDLB_GUI.%g.trc" type="FileLog">
                   <formatter-ref name="DefaultFormatter"/>
              </log-destination>
         </log-destinations>
         <log-controllers>
              <log-controller effective-severity="ALL" maximum-severity="FATAL" minimum-severity="DEBUG" name="DefaultController">
                   <associated-destinations>
                        <destination-ref association-type="LOG" name="DefaultDestination"/>
                   </associated-destinations>
              </log-controller>
         </log-controllers>
    </log-configuration>
    From a Web Dynpro view I want to use the log-controller. I'm using the default logger:
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(EinstiegView.class);
    In the wdInit method I want to log a simple message:
      public void wdDoInit()
        //@@begin wdDoInit()
        logger.setEffectiveSeverity(com.sap.tc.logging.Severity.ALL);
        logger.fatalT("test logging to new file logger");
        //@@end wdDoInit()
    I see the message in the defaultTrace.0.log, but my own log file doesn't appear.
    How to address the log-controller of my log-configuration.xml?
    Thanks in advance,
    Jürgen Dufner

    Hi,
    I guess the follwing part of your log-configuration is wrong:
    <log-controller
    effective-severity="ALL"
    maximum-severity="FATAL" m
    nimum-severity="DEBUG"
    name="DefaultController">
    Try to change in log-configuration the value for name in <log-controller> to the start sequence of the packages to be logged. E.g., all our packages should start with com.yourcompanyname.projectname
    To log all messages from classes in these packages make the name = com.yourcompanyname.projectname.
    Hope that helps,
    Regards, Astrid
    Therefore I list

  • How does log-configuration.xml work?

    Hi,
    Anyone has an idea how the "log-configuration.xml" works in Enterprise Application Project? If this properties file is configured properly, what is to be done in the code so that the log/trace messages can be written to a designated destination?
    I have been trying to find a appropriate documentation, but have not been successful so far.
    Appreciate if someone can share his/her experience with me.
    - Teecheu

    Hello,
    I can not tell how the files works, but the documentation about this topic can be seen here:
    Portal Developer Guide -> Portal Runtime Technology -> Portal Application Archives ->
    Defining a Logger Configuration.
    (http://help.sap.com/saphelp_nw04/helpdata/en/b1/441e40777cdd5fe10000000a155106/frameset.htm)
    Hope that helps,
    Jordan

  • Log-Configuration.xml Problems

    Hi, I have been trying to use log-configuration.xml but it seems like i cannot get it to work at all.
    From what i understand, once i deploy my application, i should be able to edit the config via the Visual Administrator. However, after i deploy my app, i am still unable to see it with visual administrator. furthermore, i cannot find the file anywhere on the sever. Also, my settings are not reflected in the behaviour of the defaultTrace.
    Am i suppose to be able to find the "log-configuration.xml" file in the server if i have done the correct steps? If so, what are the likely mistakes i have made? I am at my wits end, anyone can help me?
    Just to add, this post seems to describe exactly my situation except i have no idea how to "manually" correct it... log-configuration.xml outside META-INF due to NWDS
    TIA!
    Ah Beng
    Message was edited by: ah beng

    Hi Rajeshkr,
    Sorry, i am kinda new to web dynpro and sap in general so i may need you to be more explicit
    I am not quite sure what this part means or how to check "...has been deployed successfully in the deploy node of the visual Node and check for the Log Configuratior Node and check for your deployed application...."
    What i did do is go to the server to and search the entire directory structure for the log-configuration.xml but could not find it. Also, the config cannot be seen via the log-configurator in visual administration engine which its supposed too i think. and lastly the behavoiur i set in the log-configuration.xml is not reflected in the defaultTrace
    Then i saw this post so i went to check the EAR file in my workspace and found that it was just like Manik described.
    Maybe u could check this link where i posted more about my problem Log-Configuration.xml Problems
    I would love to award points if it helps

  • Create log-configuration.xml contents in portalapp.xml

    Hi All,
    I created a PAR file and want to use log-configuration.xml contents in portalapp.xml and view or edit log controllers in Visual Admin.  Is this possible?  Can i modify portalapp.xml and create and manage log controllers in Visual Admin.
    Thanks
    Prasad

    Hi Viet,
    For NW 7.0x, we'd put the log-configuration.xml in the META-INF directory of the project's EAR.  It'll work with settings in Visual Admin & ConfigTool.
    http://help.sap.com/saphelp_nw70/helpdata/en/cc/e03842134bad04e10000000a1550b0/frameset.htm
    However, the log-configuration.xml is no longer used since NW 7.1 (not sure if it comes back in NW 7.3)
    http://wiki.sdn.sap.com/wiki/display/Java/7.0to7.1evolutioninLogConfiguration
    /people/heidrun.reichart/blog/2006/11/24/how-to-use-sap-netweaver-administrator-with-sapacutes-java-platform-enterprise-edition-5 (you should also read the exchanged comments)
    Also, in NW 7.3, I believe VA is no longer exist and the entire logging configuration is done using NWA & ConfigTool.  You can search for more information about using NWA in NW 7.3 and/or java development for NW 7.3.  Also, you'd probably want to post your questions in WDJ and/or Java development forums.
    Hope it helps.
    Dao
    Edited by: Dao Ha on Aug 4, 2011 10:13 AM

  • Log-configuration.xml config does not show up in Visual Admin

    I have the following log-configuration.xml file created for a EAR project. When I deploy the file I cannot see the formatters/destinations/controllers in the log configurator.
    Please help.. thanks in advance
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
         <log-formatters>
              <log-formatter
                   name="XBTR_SERVICE_EJB_Formatter"
                   pattern="[%s] %24d [%t] %l  %m"
                   type="TraceFormatter"/>
         </log-formatters>
         <log-destinations>
              <log-destination
                   count="1"
                   effective-severity="ALL"
                   limit="1000000"
                   name="XBTR_SERVICE_EJB_Destination"
                   pattern="./logs/applications/java/ejb/xBTRservice.log"
                   type="FileLog">
                   <formatter-ref
                        name="XBTR_SERVICE_EJB_Formatter"/>
              </log-destination>
         </log-destinations>
         <log-controllers>
              <log-controller
                   effective-severity="ALL"
                   maximum-severity="ALL"
                   minimum-severity="ALL"
                   name="XBTRService_Log_Controller">
                   <associated-destinations>
                        <destination-ref
                             association-type="LOG"
                             name="XBTR_SERVICE_EJB_Destination"/>
                   </associated-destinations>
              </log-controller>
         </log-controllers>
    </log-configuration>

    Hi Rajeshkr,
    Sorry, i am kinda new to web dynpro and sap in general so i may need you to be more explicit
    I am not quite sure what this part means or how to check "...has been deployed successfully in the deploy node of the visual Node and check for the Log Configuratior Node and check for your deployed application...."
    What i did do is go to the server to and search the entire directory structure for the log-configuration.xml but could not find it. Also, the config cannot be seen via the log-configurator in visual administration engine which its supposed too i think. and lastly the behavoiur i set in the log-configuration.xml is not reflected in the defaultTrace
    Then i saw this post so i went to check the EAR file in my workspace and found that it was just like Manik described.
    Maybe u could check this link where i posted more about my problem Log-Configuration.xml Problems
    I would love to award points if it helps

  • Where to put log-configuration.xml in a JSPDynPage application

    Hi,
    I have developed a JSPDynPage application with the SAP NetWeaver Developer Studio.
    So, the structure is:
    *dist
    ***PORTAL-INF
    *****classes
    *****jsp
    *****lib
    *****localization
    *****logger
    *****pagelet
    *****private
    *******classes
    *******lib
    *****srclib.api
    *****srclib.core
    *****taglib
    ***css
    ***images
    ***scripts
    I have put it in the "logger" repository.
    But it seems that it is not used ....
    Can somebody help me, please?
    Thanks,
    Fabien

    Hi Fabien,
    the log-configuration.xml works only on J2EE applications (and now you know the difference ); within the portal you can use the older logger.xml.
    See http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm for details.
    Hope it helps
    Detlev

  • SAP Logging- Confuguring log-configuration.xml

    Hi,
    I am implementing saplogging, my log-configuration.xml looks like this.
    <log-formatters>
       <log-formatter
         name="DefaultFormatter"
         type="ListFormatter"/>
    </log-formatters>
    <log-destinations>
    <log-destination
            count="5"
            effective-severity="ALL"
            limit="80000"
            name="MyLog4Log"
            pattern="./log/applications/MyLog.%g.log"                       type="FileLog"/>
    <log-controllers>
        <log-controller
         effective-severity="ALL"
         maximum-severity="ALL"
         minimum-severity="ALL"
                   name="/Applications/myLogAP">
    <associated-destinations>
         <destination-ref                     association-type="LOG"                name="MyLog4Log"/>
    </associated-destinations>
        </log-controller>
    and in my class I am implementing like this.
    private static Category catLogger = null;
    catLogge=Category.getCategoryCategory.APPS_COMMON, "myLogAP");
    catLogger.errorT(...,...,...);
    It is not creating any file by name MyLog.0.log
    But if I use
    catLogger.addLog(new FileLog("./log/applications/MyLog.%g.log"));
    it is creating file and puttion logs into it. i dont think its a good practice to use the second one.
    I want to get name only from log-configuration.xml.
    Please put your suggession and comments
    Regards
    Abhijith YS

    HI,
    Try,
    turn off 'ForceSingleTraceFile' in visual admin
    visual admin->global configuration->kernal->log manager.
    but second method of yours is also good

  • Problem loading log-configuration.xml

    Dear Experts!
    I am developing J2EE application. I created file log-configuration.xml using SAP NetWeaver Developer Studio and put it into META-INF directory in ear file. If I use SDM to deploy ear, it displays message that deployment is successful. But Logging categories and trace locations are not created (I checked it using Visual Administrator -> Log Configurator). When I run my application it writes messages to defaultTrace instead of destination described in log-configuration.xml.
    I checked logs of J2EE server and logs of SDM. No error messages.
    Where is my mistake? Any ideas are welcome.
    WBR,
    Anton

    Hi Anton,
    Last week I was trying to explore more on the Logging and Tracing concept and I followed these documents.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f361cbea-0c01-0010-a3a0-8948bebb0a23
    /people/sap.user72/blog/2004/11/10/log-configuration-for-a-web-dynpro-application
    The Logging categories and trace locations are created and I was able to see the application specific logs in the specified location.
    Also try to create a blank .log file on the server and then try running your application.
    Regards,
    Rekha Malavathu

  • Log-Configuration-xml

    Hello!
    I configured log-configuration.xml in Developer Studio in this way:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
         <log-formatters>
              <log-formatter
                   name="FileModuleLogger"
                   pattern="%26d %150l [%t] %10s: %m"
                   type="Trace-Formatter"></log-formatter>
         </log-formatters>
         <log-destinations>
              <log-destination
                   count="5"
                   effective-severity="DEBUG"
                   limit="2000000"
                   name="FMLDestination"
                   pattern="./log/applications/de.FileModule/FML_default.log"
                   type="FileLog">
                   <formatter-ref
                        name="FileModuleLogger"></formatter-ref>
              </log-destination>
         </log-destinations>
         <log-controllers>
              <log-controller
                   bundle-name="de"
                   effective-severity="DEBUG"
                   name="de.FileModule">
                   <associated-destinations>
                        <destination-ref
                             association-type="LOG"
                             name="FMLDestination"></destination-ref>
                   </associated-destinations>
              </log-controller>
         </log-controllers>
    </log-configuration>
    Unfortunately after deploying of the ear-project I cannot find it in the Visual Admin. Shouldn´t there be a location-node "de" in the Location-tree? "destinations" and "formatters" also ignore my Logger.
    Can anyone see my mistake?
    Thank you in advance.
    Ilona Seifert

    Hi Peter!
    I have found the same problem in my application, the log-configuration.xml is not deployed correctly... did you finally solve it automatically?
    Thank you very much in advance for your ansser.
    Isidro

  • DUMP ERROR log-configuration.xml

    Hi expect
    I´m new in BPC and i am working a new proyect BPC for NW in our company. When i try to create a "Business Process Flow" BPF, the system give a DUMP ERROR Access denied c:program filesBusinessObjectsPC_NWlog-configuration.xml. Any idea to fit that.
    So anyone had a BPC Manual that give help to understand BPC NW, it will very helpfull for me.
    Thank a lot

    HI David,
    you will find information about BPC NW at help.sap.com or if you prefer take a look at this link https://websmp207.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000726399&_SCENARIO=01100035870000000202& , there you will find allmost every thing to learn the basics.
    Maybe this document will help you, this is a how to 4 bpf http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/00971e51-27eb-2c10-479d-d1a0fa8f2cc0
    hope this helps =)
    Edited by: Guillermo Ferro on Mar 15, 2011 10:18 PM

  • Kodo-ds.xml: how to use for two database in same app server?

    hi,
    i meet a problem: i have two applications in the same app server(one app
    use one database.). BUT, only one kodo-ds.xml can configure the
    PersistenceManagerFactory with jndi name. When i figure the two jidi name
    for two "<tx-connection-factoy>" in the root element
    "<connection-factories>" in the kodo.ds.xml. That's unavailable!
    eg:
    <connection-factories>
    <tx-connection-factoy>
    <!-- specify the the first database connection properties with jndi name A
    -->
    </tx-connection-factoy>
    <tx-connection-factoy>
    <!-- specify the the SECOND database connection properties with jndi name
    B -->
    </tx-connection-factoy>
    </connection-factories>
    THAT'S MY CONFIGURATION. UNAVALIABLE NOW.... Who can help me solve this
    problem?
    thx!

    You should deploy multiple kodo-ds.xml files (i.e. kodo-ds-oracle.xml).
    Kidwish wrote:
    hi,
    i meet a problem: i have two applications in the same app server(one app
    use one database.). BUT, only one kodo-ds.xml can configure the
    PersistenceManagerFactory with jndi name. When i figure the two jidi name
    for two "<tx-connection-factoy>" in the root element
    "<connection-factories>" in the kodo.ds.xml. That's unavailable!
    eg:
    <connection-factories>
    <tx-connection-factoy>
    <!-- specify the the first database connection properties with jndi name A
    -->
    </tx-connection-factoy>
    <tx-connection-factoy>
    <!-- specify the the SECOND database connection properties with jndi name
    B -->
    </tx-connection-factoy>
    </connection-factories>
    THAT'S MY CONFIGURATION. UNAVALIABLE NOW.... Who can help me solve this
    problem?
    thx!
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • How to package log configuration into META-INF folder of an SDA

    Hi all,
    I work with Developer Studio 2.0.20. After some struggle I managed to configure my DCs by a a deployed log-configuration.xml.
    I use a "Portal Application Standalone (Packed in SDA)" DC to package and deploy. The created SDA contains a META-INF folder and a PAR file. If I copy the log-configuration.xml file manually into the META-INF folder of the SDA then the log-configuration.xml is used by the server.
    Now, my problem is, that I did not manage to have the log-configuration.xml automatically included in the META-INF folder of the SDA. Does anyone now how this can be accomplished with Dev Studio 2.0.20?
    Thanks for your attention,
    --Stefan

    You may add any .txt file as add manifest file or you click the "edit manifest" toolbar button to add comtent for manifest file...
    it will create meta-inf folder automatically.
    At least the tool can save lot of your time.

  • How to use logging in the actions classes extends standart actions?

    Hello!
    I have some action classes extends standart actions, for example Z_ExtMaintainBasketDispatcherAction extends MaintainBasketDispatcherAction. I tried to use logging functionality in my classes but there were no my lines in log and trace files.
    For example I added followed lines in basketPerform() method of Z_ExtMaintainBasketDispatcherAction:
    boolean isDebugEnabled = log.isDebugEnabled();
    if(isDebugEnabled){
    log.debug("++++++++++++++++ Test tracing in B2B_SNG. ++++++++++++++++");
    but in there was no such line neither in log file nor in trace file.
    How I can use logging functionality in my own classes? I need it for tracing and logging.
    CRM 5.0
    regards, Lev

    Well, here is solution. I created a log formatter and log destination like this:
    <log-formatters>
    <log-formatter name="application_sap.com/crm~b2b" type="TraceFormatter" pattern="%d,%-3p %t %s %l %m"/>
    </log-formatters>
    <log-destinations>
    <log-destination name="application_sap.com_crm.b2b" type="FileLog"
        count="10" effective-severity="ALL" limit="10000000" pattern=".\log\applications\isa_ru.log">
    <formatter-ref name="application_sap.com/crm~b2b"/>
    </log-destination>
    </log-destinations>
    and new log controller like this:
    <log-controller effective-severity="ALL" name="ru.sng.isa">
    <associated-destinations>
    <destination-ref name="application_sap.com_crm.b2b" association-type="LOG"/>
    </associated-destinations>
    </log-controller>
    in file META-INF\log-configuration.xml
    Thanks everybody for help!
    Regards, Lev.

Maybe you are looking for

  • Mac keeps losing network connection

    I upgraded my Mac mini over the weekend to Yosemite. Upgrade went fine / no issues. However since the upgrade the Mac can no longer retain it;s IP address. It simply drops off the network. It does this whether it's on Ethernet or wifi. I've trashed t

  • Macbook curser not operating as it should.

    my macbook (white, early 2008) will not allow the curser to click on anything in the menu bar, folder, etc. cannot select anything with it. i can utilize some commmands, but limited on what i can do with that. i attached a mouse and it worked.i can s

  • Error 51 when upgrading iphone 6 to ios 8.1.3.

    looks like the serial number is lost when preparing the phone for the update. can't be verified by apple servers. tried to restore. nothing; still not recognized. tried dfu, same result. basically, i have a large, expensive brick

  • Laptop simply refuses to boot from CD

    Hey, I currently have a Toshiba Satellite L670D-13F laptop in my custody. I'm attempting to completely format the harddrive so I can install a fresh version of Windows. I did initially try using the on-board recovery system to try and get it back to

  • Support Site Super Slow?

    I was attributing it to the release of Lion and maybe just getting tons more people... but that seems to have settled somewhat.  Also, considering the nature of the support site (being pretty much just text), I would expect it could handle quite a bi