Tag 2.13.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEnQpWqqDWDgwMfczAtMcIk7Yrq+gFAl8oyWkACgkQtMcIk7Yr
q+hw2g/9EeGkT91yvoI7st+/DOrqAHA7thpJa9bzJDVeaTrYG1wHgr63kfevkR47
2VF1hghyZVsMjqFQw0DPvKQSCuFBP9Lqu5M9r5UmCBZmihJJB10SZKv2J2kt/ylu
5/jVY0fo7y8+fml1Pg1EkSUT0uvI5Q9RYPs+tPIVzy1kKK7v0JmMsaHLx+ZokljG
1QJPD92tysO+I1ewuqbbHnW1M3HZF9ho7bkLsppBoann4rQYXxEyETcoJzUZ0DuD
SG+SloGWzD5NwnvpULuKeVD1EijO14LwuNM4UaZlvayNWgFxL+VY1cpmoq1me2VO
ztrOEuKgKKrU8ygMBIQsCy+11K0/ROolY4FBFHpSePD47MJ3ctMKtu8+pe5oynX7
KH0+Uo+p0xBZqVpDOVVYZlCJpiEfuV10kUKL5k9mI6E2Abj6dNyfrDXUGYKOLQqD
qtVPEZW1m/wlzPGELWIajK67Db5mQKYXSdfnvqDX7eeVZuHQnzPtv+u+HlMSWAX9
VmZmrlS54fK9maeXntyMpXF8TD+jcKkX7aU8gDLJJy6wzGF62gZRh16VIu8fc2IL
2pSTZON4czlmG1Kk59uls/tL1NcxXGMeQiGG1GxY0MB+XC2kVDx0D5OUlnXX25NQ
CR4Hv8ftqarM5b8eDWzIpmPc91GzODoa1njM9QAncN9ofSj3jrw=
=OQM/
-----END PGP SIGNATURE-----
[maven-release-plugin] prepare release log4j-2.13.0-rc2
42 files changed
tree: 2b2c94b7d8b8204cbf2cad6d481f520cac276d56
  1. .dockerignore
  2. .gitattributes
  3. .gitignore
  4. .mvn/
  5. .travis-toolchains.xml
  6. .travis.yml
  7. BUILDING.md
  8. CONTRIBUTING.md
  9. Dockerfile
  10. LICENSE.txt
  11. NOTICE.txt
  12. README.md
  13. RELEASE-NOTES.md
  14. checkstyle-header.txt
  15. checkstyle-import-control.xml
  16. checkstyle-suppressions.xml
  17. checkstyle.xml
  18. doap_log4j2.rdf
  19. findbugs-exclude-filter.xml
  20. jenkins-toolchains-win.xml
  21. jenkins-toolchains.xml
  22. log4j-1.2-api/
  23. log4j-api-java9/
  24. log4j-api/
  25. log4j-appserver/
  26. log4j-bom/
  27. log4j-cassandra/
  28. log4j-core-its/
  29. log4j-core-java9/
  30. log4j-core/
  31. log4j-couchdb/
  32. log4j-distribution/
  33. log4j-docker/
  34. log4j-flume-ng/
  35. log4j-iostreams/
  36. log4j-jcl/
  37. log4j-jdbc-dbcp2/
  38. log4j-jmx-gui/
  39. log4j-jpa/
  40. log4j-jul/
  41. log4j-kubernetes/
  42. log4j-liquibase/
  43. log4j-mongodb2/
  44. log4j-mongodb3/
  45. log4j-osgi/
  46. log4j-perf/
  47. log4j-samples/
  48. log4j-slf4j-impl/
  49. log4j-slf4j18-impl/
  50. log4j-spring-cloud-config/
  51. log4j-taglib/
  52. log4j-to-slf4j/
  53. log4j-web/
  54. mvnw
  55. mvnw.cmd
  56. pom.xml
  57. src/
  58. toolchains-docker.xml
  59. toolchains-sample-linux.xml
  60. toolchains-sample-mac.xml
  61. toolchains-sample-win.xml
README.md

Apache Log4j 2

Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture.

Jenkins Status Travis Status Maven Central

Pull Requests on Github

By sending a pull request you grant the Apache Software Foundation sufficient rights to use and release the submitted work under the Apache license. You grant the same rights (copyright license, patent license, etc.) to the Apache Software Foundation as if you have signed a Contributor License Agreement. For contributions that are judged to be non-trivial, you will be asked to actually signing a Contributor License Agreement.

Usage

Users should refer to Maven, Ivy, Gradle, and SBT Artifacts on the Log4j web site for instructions on how to include Log4j into their project using their chosen build tool.

Basic usage of the Logger API:

package com.example;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class Example {
    private static final Logger LOGGER = LogManager.getLogger();

    public static void main(String... args) {
        String thing = args.length > 0 ? args[0] : "world";
        LOGGER.info("Hello, {}!", thing);
        LOGGER.debug("Got calculated value only if debug enabled: {}", () -> doSomeCalculation());
    }

    private static Object doSomeCalculation() {
        // do some complicated calculation
    }
}

And an example log4j2.xml configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
    </Console>
  </Appenders>
  <Loggers>
    <Logger name="com.example" level="INFO"/>
    <Root level="error">
      <AppenderRef ref="Console"/>
    </Root>
  </Loggers>
</Configuration>

Documentation

The Log4j 2 User's Guide is available here or as a downloadable PDF.

Requirements

Log4j 2.4 and greater requires Java 7, versions 2.0-alpha1 to 2.3 required Java 6. Some features require optional dependencies; the documentation for these features specifies the dependencies.

License

Apache Log4j 2 is distributed under the Apache License, version 2.0.

Download

How to download Log4j, and how to use it from Maven, Ivy and Gradle. You can access the latest development snapshot by using the Maven repository https://repository.apache.org/snapshots, see Snapshot builds.

Issue Tracking

Issues, bugs, and feature requests should be submitted to the JIRA issue tracking system for this project.

Pull request on GitHub are welcome, but please open a ticket in the JIRA issue tracker first, and mention the JIRA issue in the Pull Request.

Building From Source

Log4j requires Apache Maven 3.x. To build from source and install to your local Maven repository, execute the following:

mvn install

Contributing

We love contributions! Take a look at our contributing page.