Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-1295

Unable to Configure Logging for REST API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • 0.4.2
    • None

    Description

      I have not been able to configure logging for the REST API. To replicate, create a log4j configuration file, then add the following to "Metron JVM Flags" in Ambari > Metron > Config.

      -Dlog4j.debug -Dlog4j.configuration=file:/usr/metron/0.4.2/config/log4j.properties
      

      This will result in the following exception when Log4j initializes.

      log4j: Using URL [file:/usr/metron/0.4.2/config/log4j.properties] for automatic log4j configuration.
      log4j: Reading configuration from URL file:/usr/metron/0.4.2/config/log4j.properties
      log4j: Parsing for [root] with value=[INFO, file].
      log4j: Level token is [INFO].
      log4j: Category root set to INFO
      log4j: Parsing appender named "file".
      log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.hadoop.hbase.shaded.org.apache.log4j.Appender" variable.
      log4j:ERROR The class "org.apache.hadoop.hbase.shaded.org.apache.log4j.Appender" was loaded by
      log4j:ERROR [sun.misc.Launcher$AppClassLoader@5c647e05] whereas object of type
      log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [sun.misc.Launcher$AppClassLoader@5c647e05].
      log4j:ERROR Could not instantiate appender named "file".
      log4j: Finished configuring.
      

      Attachments

        Issue Links

          Activity

            People

              nickwallen Nick Allen
              nickwallen Nick Allen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: