Registry / logging / log4j-api

log4j-api

JSON →
library2.26.0javamavenunverified

The public API for the Apache Log4j 2 logging framework, providing logging interfaces and factories.

<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.26.0</version> </dependency>
INSTALL
IMPORT
SIG · LOG4J-API
L
log4j-api
loggingjavav2.26.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LogManager
org.apache.logging.log4j.LogManager

Demonstrates obtaining a Logger via LogManager and logging a message.

import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class Example { private static final Logger logger = LogManager.getLogger(Example.class); public static void main(String[] args) { logger.info("Hello, Log4j 2!"); } }
Debug
Known issues
breakingLog4j 2.x has known security vulnerabilities (CVE-2021-44228) in versions before 2.17.0.
fix
Upgrade to version 2.17.0 or later to mitigate JNDI injection attacks.
affects: <2.17.0
Upgrade
Version history
2.26.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
Resources
log4j-api — mvn dependency:get log4j-api · libregistry