1 Reply Latest reply: Nov 29, 2013 5:23 AM by 6b0fcd33-84bc-4f68-a411-0977fd1e1420 RSS

    ATG - Logging into seperate file for each Batch Job by using  RotatingFileLogger class

    983427

      Hi All,

       

      Can anyone please explain me the steps to implement Logging debug/error into separate file for each Batch Job by using  RotatingFileLogger class.

       

      Thanks,

      Mahesh

        • 1. Re: ATG - Logging into seperate file for each Batch Job by using  RotatingFileLogger class
          6b0fcd33-84bc-4f68-a411-0977fd1e1420

          below are the Steps to implement the separate log debug/error file(instead of of server.log)  for each component/Batch job.

           

          1)Assume that you writing XYZ batchjob/component in that property file override the logListeners=/com/CustomComponent

           

          2) Write CustomComponent with below details:

           

          $class=atg.nucleus.logging.RotatingFileLogger

          logFilePath=./logs

          logFileName=Sample.log

          logListeners=\

            /atg/dynamo/service/logging/ScreenLog

           

           

          scheduler=/atg/dynamo/service/Scheduler

          schedule=calendar * . 1 1 0

          logArchivePath=./logs/archives

          maximumArchiveCount=20

          archiveCompressed=true

           

          after implementing above code you will see all log debugger and error of XYZ component into separate file Sample.log(instead of server.log).

           

          Thanks,

          Mahesh