Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2238

Logback appender

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Can we have logback as the default logging implementation of pax-logging-service and have a way to load custom appender?

      We want to create a log appender with custom threading control and found that we can't with log4j 1.x (https://issues.apache.org/jira/browse/LOG4J2-3). Karaf's pax-logging-service uses (slf4j+log4j), so we replaced pax-logging-logback. But we find it difficult to do because pax-logging-logback embeds Logback jars inside the bundle without exporting packages and faced with osgi class loading issues. We can do it by defining custom appender fragment for pax-logging-logback host at startup.properties and set the org.ops4j.pax.logging.cfg for logback configuration. But we find that is not convenient for development for having to copy updated Jars to <kavaf_home>/system folder in every iteration.

      We are wondering if there is better way dynamically add the appender when we install our bundle on a standard Karaf distribution?

      Attachments

        Activity

          People

            Unassigned Unassigned
            kdong Keren Dong
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: