2 Replies Latest reply on May 1, 2011 9:31 PM by Kristian Wright

    Logging Not Working in Java Code

    Kristian Wright Level 1

      Hi everyone,


      I'm looking into the Java code for the Portal app, and I'm trying to do some debugging as to what's going on.  I see a lot of the Adobe classes use the log4j Logger to output general logging information as well as errors, but there never seems to be any output in the log files.  The files I'm checking for activity are:


      Adobe LiveCycle ES2\jboss\server\lc_turnkey\log\server.log

      Adobe LiveCycle ES2\jboss\bin\correspondencemanagement.log


      When I build and deploy the application onto the LC server, just before my application starts I get the following line in the server.log:


      2011-04-29 14:30:49,055 INFO  [STDOUT] **** No servlet context set in ServletLogTarget - logging disabled.


      followed by a message saying that my application has started.  The line above happens everytime I re-deploy the application (without actually running the app), right before it starts, so I'm assuming that it is directly related to my application.


      The only 'com.adobe' related logging lines that happen in the correspondencemanagement.log file are written when I physically run the app, and I get the following line:


      2011-04-29 14:31:34,298 69729 INFO  [com.adobe.dct.service.impl.DataDictionaryRegistryServiceImpl] Fetching Complete Data Dictionary object graph.


      Looking into the code for the com.adobe.dct.service.impl.DataDictionaryRegistryServiceImpl class, I see it uses a completely different logging system (ie not log4j).




      I've changed the services-config.xml file and tried setting the logging target to both flex.messaging.log.ServletLogTarget and flex.messaging.log.ConsoleTarget, but neither seem to make a difference.


      I must be missing some kind of configuration to get the logging to work correctly, but Google has been little help as well.


      Hopefully someone has crossed this issue before, and has a solution?  Any help / pointers / advice etc welcome and appreciated!!!




        • 1. Re: Logging Not Working in Java Code
          Saket Agarwal Level 1

          You should be configuring logging in CMSA in the log4j.xml file within the CMSA solution template.

          The file can be found @ {LiveCycle Home}\sa_resources\SA_SDK_9.5\CorrespondenceManagement\FSIApp\Portal\resources

          Having chnaged the configurations there, the effect would/can be seen in the correspondencemanagement.log file. (and not the server.log)

          • 2. Re: Logging Not Working in Java Code
            Kristian Wright Level 1

            Thanks for the reply Saket.


            It turns out that the logging was working correctly all along.  The messages I could not find were all related to bootstrap code.  I was assuming that the bootstrapper would run each time the application was deployed, or at the very least each time the server was started.  It turns out that you manually need to run the bootstrapper.  So I was looking for log lines that would never appear by themselves.  Once I manually ran the bootstrap process, the log lines ran as expected.