Skip to content

GSIP 167

Jody Garnett edited this page Apr 5, 2018 · 9 revisions

GSIP 167 - Log4j Upgrade

Overview

Review our logging dependencies, part of updating libraries for Java 9 compatibility:

Proposed By

Jody Garnett

Assigned to Release

This proposal is for GeoServer 2.14

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

We are using log4j 1 series which has ended, Log4J 2.8.2 and newer is compatible with Java jigsaw.

Proposal

We are currently using:

  • log4j - 1.2.17
  • org.slf4j - 1.6.4
  • commons-logging - 1.1.1
  • "java utility logging" - built into jre

Upgrading to log4j 2 provides:

  • XML, JSON, YAML, or Java properties syntax (included nested properties)
  • compatibility with log4j 'chainsaw" GUI

For more information https://logging.apache.org/log4j/2.x/manual/configuration.html

Backwards Compatibility

GeoServer data directory contains named log4j configuration files, these log4j properties files are by their nature brittle and we should not expect to reuse them (they contain the class names of specific appenders which may of changed for log4j 2.x).

When configured with an empty data directory their is a series of "named" log4j property file configurations that are unpacked into the data directory folder.

Using this functionality:

  • each time we can detect an old named "built-in" log4j properties file we could replace it with the one baked into the WAR.
  • If the user has a custom configuration we will will not be able to load it

For information on configuration migration:

Feedback

Voting

Project Steering Committee:

  • Alessio Fabiani:
  • Andrea Aime:
  • Ben Caradoc-Davies:
  • Brad Hards:
  • Christian Mueller:
  • Ian Turton:
  • Jody Garnett:
  • Jukka Rahkonen:
  • Kevin Smith:
  • Simone Giannecchini:

Links

Clone this wiki locally