Skip navigation
Currently Being Moderated

Custom Service Component to setup LOG4J logger

Apr 6, 2011 6:00 AM

Hi all,

 

I am doing a project where I have a number of processes (renderPDF, renderPDFA, and renderPCL) Each of these processes are run many times during the day and they need to log in each of their own logfiles. I have setup the log4j properties file up right and got almost what I want. Now I just need all of the above processes to share the same log instance. Hence I have tried to create my own service component that should be instantiated at startup of the server. However I must do something wrong as I do not get anything logged in my log files.

 

I have tried to add an executeScript step in the beginning of one of my processes (renderPDF) and after one invocation remove it. This seems to work, so my log4j stuff is working - however when I restart the server the log do not work anymore

 

Please advice what to do or how to adress such an challenge

 

Sincerely

Kim Christensen

Dafolo A/S

Denmark

 
Replies
  • Currently Being Moderated
    Apr 7, 2011 1:06 AM   in reply to kc@dafolo.dk

    Why don't you prefer Adobe's logging mechanism. If you use this, you could log everything on a central log file.

     

    import com.adobe.logging.AdobeLogger;

     

    private static final AdobeLogger logger = AdobeLogger.getAdobeLogger(YourClassName.class);

     

    logger.log(Level.INFO, 'Your Information to the central log file");

     

    Is this not what you want?

     

    Nith

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points