Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-282

Work well with Apache logging (Log4J)

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1, 2.2, 2.2.1
    • 2.2.2
    • Core Java Framework
    • None

    Description

      UIMA uses the standard java.util.logging (JUL). Most of my company's code used Apache Log4J, so we have a problem merging the messages from the two logging packages. Given that UIMA is now an Apache project, I think it makes sense that it work with Apache logging.

      Two options occur to me:

      1. Change all the logging calls in the code (perhaps Eclipse refactoring tools can help with that). Here's some discussion on migrating: http://www.oreillynet.com/onjava/blog/2005/12/migrating_from_jdk_logging_to.html

      You could convert either to Log4J ( http://logging.apache.org/log4j/docs ) or to Apache Jakarta Commons Logging ( http://jakarta.apache.org/commons/logging ), which would allow UIMA to be configured to use either JUL or Log4J.

      2. Write/find a JUL Handler that re-directs to Log4J. Here's an example: http://home.gwu.edu/~amrinder/chainsawHandler/UsingChainsawWithJDKLogging.html

      Attachments

        1. Log4jLogger_impl.java
          13 kB
          Roberto Franchini
        2. Log4jLogger_impl.java
          13 kB
          Roberto Franchini
        3. TestLog4jLogger_impl.java
          11 kB
          Roberto Franchini
        4. TestLog4jLogger_impl.java
          10 kB
          Roberto Franchini

        Activity

          People

            mbaessler Michael Baessler
            holmberg Adam Holmberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: