Log4j Scala API is a Scala logging facade based on Log4j 2. This supports Scala 2.10, and 2.11 on Java 7 at minimum, and Scala 2.12 on Java 8 at minimum. Log4j Scala API provides Log4j 2 as its default logging implementation, but this is not strictly required (e.g., this API can also be used with Logback or other Log4j 2 API provider implementations). Idiomatic Scala features are provided as an alternative to using the Log4j 2 Java API.

Note that this Scala API was versioned and released in sync with Log4j up until version 2.8.2, but from now on it will be versioned and released independently, that's why the version was bumped to 11.0.

Documentation

Requirements

Log4j Scala API requires at least Java 7 for Scala 2.10/2.11, or Java 8 for Scala 2.12. This also requires Log4j 2 API, but it is specified as transitive dependencies automatically if you are using SBT, Maven, Gradle, or some other similar build system. This also requires Log4j 2 Core (or possibly an other implementation of Log4j 2 API) as a runtime dependency. Some Log4j 2 Core features require optional dependencies which are documented in the Log4j 2 manual.