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

Site fixes/improvements for 2.4 release



    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.4.1
    • Documentation
    • None


      changelog.html (outdated)
      -Configuration via property files is not supported.
      +Configuration via property files is supported from version 2.4, but is not compatible with Log4j 1.x.

      changes.xml (improvement)
      -LOG4J2-952: Add ConfigurationBuilder.
      +LOG4J2-952: Add ConfigurationBuilder for programmatic configuration.

      faq.html (outdated, duplicate)

      • Under "How do I configure log4j2 in code without a configuration file?"
        -You could use the static method #initialize(String contextName, ClassLoader loader, String configLocation) (see source code) in org.apache.logging.log4j.core.config.Configurator. (You can pass null for the class loader.) Be aware that this class is not part of the public API so your code may break with any minor release.
        +From 2.4, Log4j 2 provides an [API for programmatic configuration|manual/customconfig.html]. The new ConfigurationBuilder API allows you to create Configurations in code by constructing component definitions without requiring you to know about the internals of actual configuration objects like Loggers and Appenders.
      • Merge these answers into a single Q&A entry:
        "How do I change a logger's level in code?" and
        "How do I set a logger's level programmatically?"
      • Version
        -the log4j-api-2.1 and the log4j-core-2.1 jar files
        +the log4j-api-2.4 and the log4j-core-2.4 jar files

      manual/appenders.html (site errors and ambiguities)
      Kafka Appender

      • Kafka Appender is missing from the left nav-bar in Appenders

      -The KafkaAppender log events
      +The KafkaAppender logs events

      -lilter (Parameter Name)

      -If you do not specify a layout, if not specified the formatted message as an UTF-8 encoded string will be sent to Kafka.
      +If you do not specify a layout, the formatted message will be sent to Kafka as an UTF-8 encoded string.
      I used the active voice (GG):
      +If you do not specify a layout, the appender will send the formatted message to Kafka as a UTF-8 encoded string.

      -This appender requires Kafka client library
      +This appender requires Kafka client library. (add period at end)

      ZeroMQ appender

      • Section title and left nav-bar title should be "JeroMQ". Tweaked as "ZeroMQ/JeroMQ" because some folk may not know that the ZeroMQ Java client is "JeroMQ".
      • Is a layout required? What layout is used if nothing is specified?

      -The name of the Appender.
      +The name of the Appender. Required.

      (Parameter Name)
      +layout (lower case)

      +filters (lower case); other appenders use singular "filter" without trailing 's', but the code for JeroMQ says @PluginElement("Filters") Filter filter
      Using upper case because this is an Element, not an Attribute. Normalized to singular, instead plural.

      -Property, Type=Property
      +properties (lower case, plural), Type=Property[] - this is consistent with docs for PropertiesRewritePolicy in RewriteAppender
      ggregory: As above, leaving as upper case because this is an Element, not an Attribute. Since configurations are cases insensitive, this could be a moot point.
      remkop@yahoo.com: Understood. I did fix name to plural and type to Property[]

      manual/layouts.html (CsvLogEventLayout bug, site errors)

      • CSV Layout is missing from the left nav-bar in Layouts
      • CSV Layout section should mention dependency on Apache Commons CSV. (See JSONLayout on same page.)
      • Bug: CsvLogEventLayout generates NanoTime timestamps but these are always zero.
        To fix this, add the below code to the CsvLogEventLayout constructor:
              // LOG4J2-1074 Switch to actual clock if nanosecond timestamps are required in config.
              // LoggerContext will notify known NanoClockFactory users that the configuration has changed.
      • GELF Layout should be before HTML Layout in body text and in left nav-bar (alphabetical order)
      • HTML Layout should be before JSON Layout in body text (alphabetical order - the nav-bar order is correct)
      • (Under Location Information)
        -%C or $class - this is rendered as "%C or class java.lang.Object"
        +%C or %class

      manual/customconfig.html (improvements)

      • Side-nav menu title "Extending Log4j Configuration" should be "Programmatic Log4j Configuration"
      • Title "Custom Configurations" -> "Programmatic Configuration"

      Error: You do not have 100 % convergence. - is this a showstopper?

      77 Clirr errors - I believe these are all expected and can be ignored.

      122 checkstyle errors - not showstoppers


      • Missing dependency information for JeroMQ/ZeroMQ Appender on JeroMQ library
      • Missing dependency information for CSV layouts on Apache Commons CSV

      Error: You do not have 100 % convergence. - Is this a showstopper?

      1652 checkstyle errors - not showstoppers

      -due the the plugin auto discovery
      +due to the plugin auto discovery

      Error: You do not have 100 % convergence. - Is this a showstopper?


        Issue Links



              Unassigned Unassigned
              rpopma Remko Popma
              0 Vote for this issue
              3 Start watching this issue