Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1379

Documentation is subzero quality as far as yaml config files are concerned

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8
    • None
    • None

    Description

      Documentation for yaml config files

      http://logging.apache.org/log4j/2.x/manual/configuration.html

      fails to mention that this dependency must be added to actually use yaml config files:

              <dependency>
                  <groupId>com.fasterxml.jackson.dataformat</groupId>
                  <artifactId>jackson-dataformat-yaml</artifactId>
                  <version>2.7.4</version>
              </dependency>
      

      It also fails to mention that the equivalent basic config in yaml is the following:

      Configuration:
        status: warn
      
        Appenders:
          Console:
            name: Console
            target: SYSTEM_OUT
            PatternLayout:
              Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
      
        Loggers:
          Root:
            level: info
            AppenderRef:
              ref: Console
      

      At runtime, log4j2 "does not find" the config file (useless and misleading error message), which in reality means it does not find the needed dependencies.

      To actually fix this, one must debug log4j2.

      So basically failing to mention something in documentation (effort = 0) causes users to have to debug log4j (effort >> 0).

      This gives the whole project an amateurish and unkempt feel.

      Attachments

        1. log4j2.xml
          0.8 kB
          piero de salvia
        2. log4j2.yaml
          0.7 kB
          piero de salvia

        Activity

          People

            mattsicker Matt Sicker
            piero piero de salvia
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: