Skip to content

log4j-slf4j[2]-impl: Misleading and unclear names/descriptions #1462

@Chealer

Description

@Chealer

Description

log4j-slf4j-impl has the following name and description:

<name>Apache Log4j SLF4J Binding</name>
description>The Apache Log4j SLF4J API binding to Log4j 2 Core</description>

log4j-slf4j2-impl has the following name and description:

<name>Apache Log4j SLF4J 2.0 Binding</name>
<description>The Apache Log4j SLF4J 2.0 API binding to Log4j 2 Core</description>

log4j-slf4j-impl's case is clearly misleading as it fails to indicate it (visibly) only supports SLF4J 1. log4j-slf4j2-impl's case is less bad, but also quite problematic:

  1. It mentions SLF4J 2.0 only, but future 2.x versions will (until proven otherwise) also be supported.
  2. It should be read as "The Apache Log4j ((SLF4J 2.0 API) binding to (Log4j 2 Core))", but could be read as "(The Apache Log4j SLF4J 2.0) ...". This ambiguity is understandable in the name, but considering that Log4j is itself a complex solution, and part of a ridiculously complicated Java logging ecosystem, a minimum has to be done to avoid that.
  3. Related to point Minor documentation fixes for JSON layout #2, this does little to prevent confusion with the Apache Log4j to SLF4J Adapter.
  4. It uses the term "binding", while SLF4J 2 now prefers "provider".

Given all these considerations, I would suggest the following.

log4j-slf4j-impl:

<name>SLF4J 1 Binding for Log4j</name>
<description>
Simple Logging Facade for Java (SLF4J) version 1 API binding (provider) for Apache Log4j (version 2) core.
Allows using Log4j as an implementation of SLF4J.
</description>

log4j-slf4j2-impl:

<name>SLF4J 2 Provider for Log4j</name>
<description>
Simple Logging Facade for Java (SLF4J) version 2 provider (API binding) for Apache Log4j (version 2) core.
Allows using Log4j as an implementation of SLF4J.

This is not the Apache Log4j to SLF4J Adapter (log4j-to-slf4j).
</description>

Metadata

Metadata

Assignees

Labels

documentationPull requests or issues that affect documentation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions