Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-2363

Unable to configure logging with log4j.properties file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.17
    • None
    • Distribution
    • None

    Description

      Currently, when starting Airavata, I see this on the console:

      SLF4J: Found binding in [jar:file:/home/airavata/master-deployment/api-orchestrator/apache-airavata-server-0.17-SNAPSHOT/lib/logback-classic-1.1.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/airavata/master-deployment/api-orchestrator/apache-airavata-server-0.17-SNAPSHOT/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/airavata/master-deployment/api-orchestrator/apache-airavata-server-0.17-SNAPSHOT/lib/slf4j-simple-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      

      This means that there are 3 different bindings for SLF4J. There should only be one.

      It also appears that it is picking up the logback binding, although unfortunately it doesn't explicitly say so. I say that because I don't see any log4j messages when I add -Dlog4j.debug as an argument.

      If I delete from the lib directory

      • logback-classic-1.1.6.jar
      • and slf4j-simple-1.7.25.jar

      Then slf4j uses log4j and the log4j.properties file in the bin/ directory is used for configuration.

      As it stands right now, we are providing a log4j.properties file in the bin/ directory of the distribution that doesn't actually do anything. We should give users a way to configure logging.

      I think there are a few options:

      • go with log4j12 logging
        • the logback logging was added, I think, for the Kafka integration, so removing logback would remove the Kafka integration
      • go with logback logging
      • switch to something else like log4j 2.x
        • log4j 2 has Kafka integration, but I'm not sure how well it works

      Attachments

        Activity

          People

            marcuschristie Marcus Christie
            marcuschristie Marcus Christie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: