Menu

Logging

Help
Bob C
2005-05-26
2013-04-16
  • Bob C

    Bob C - 2005-05-26

    I have written several pipeline stages and I would like to enable logging. I thought that something like the following would do the trick:

    import com.babeldoc.core.LogService;

    LogService.getInstance().logInfo("File Archived");

    I thought that maybe the info line would show up in the journal.log file, but it doesn't.

    Has anyone done any custom logging?

    Thanks,
    Bob

     
    • Sherman Wood

      Sherman Wood - 2005-05-26

      The LogService uses apache.commons.logging.

      Try configuring as per log4j.

      Sherman

       
    • Bob C

      Bob C - 2005-05-27

      Where would I put the configuration file?

      Thanks,
      Bob

       
      • Sherman Wood

        Sherman Wood - 2005-05-31

        I think there is some classpath magic you can do to have log4j find a log4j.properties or log4j.xml, but I don't rely on that.. I run in JBoss, and the babeldoc logging uses the JBoss log environment. If you are running babeldoc in a standalone JVM, you can use a parameter to the JVM, like:

        -Dlog4j.configuration=/log4j.xml

        Sherman

         
    • Bob C

      Bob C - 2005-05-31

      Thanks Sherman. I found the default log4j.properties file. It's in \modules\core\config. I added a FileAppender to it. It's working fine.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.