GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BytecodeDL/log4j2: log4j2

BranchesTags
Open more actions menu

Latest commit

 

History

11,235 Commits
11,235 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.mvn/wrapper
.mvn/wrapper
 
 
log4j-1.2-api
log4j-1.2-api
 
 
log4j-api-java9
log4j-api-java9
 
 
log4j-api
log4j-api
 
 
log4j-appserver
log4j-appserver
 
 
log4j-bom
log4j-bom
 
 
log4j-cassandra
log4j-cassandra
 
 
log4j-core-its
log4j-core-its
 
 
log4j-core-java9
log4j-core-java9
 
 
log4j-core
log4j-core
 
 
log4j-couchdb
log4j-couchdb
 
 
log4j-distribution
log4j-distribution
 
 
log4j-docker
log4j-docker
 
 
log4j-flume-ng
log4j-flume-ng
 
 
log4j-iostreams
log4j-iostreams
 
 
log4j-jakarta-web
log4j-jakarta-web
 
 
log4j-jcl
log4j-jcl
 
 
log4j-jdbc-dbcp2
log4j-jdbc-dbcp2
 
 
log4j-jmx-gui
log4j-jmx-gui
 
 
log4j-jpa
log4j-jpa
 
 
log4j-jpl
log4j-jpl
 
 
log4j-jul
log4j-jul
 
 
log4j-kubernetes
log4j-kubernetes
 
 
log4j-layout-template-json
log4j-layout-template-json
 
 
log4j-liquibase
log4j-liquibase
 
 
log4j-mongodb3
log4j-mongodb3
 
 
log4j-mongodb4
log4j-mongodb4
 
 
log4j-osgi
log4j-osgi
 
 
log4j-perf
log4j-perf
 
 
log4j-samples
log4j-samples
 
 
log4j-slf4j-impl
log4j-slf4j-impl
 
 
log4j-slf4j18-impl
log4j-slf4j18-impl
 
 
log4j-spring-boot
log4j-spring-boot
 
 
log4j-spring-cloud-config
log4j-spring-cloud-config
 
 
log4j-taglib
log4j-taglib
 
 
log4j-to-slf4j
log4j-to-slf4j
 
 
log4j-web
log4j-web
 
 
src
src
 
 
workflows
workflows
 
 
.dockerignore
.dockerignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.java-version
.java-version
 
 
BUILDING.md
BUILDING.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE.txt
LICENSE.txt
 
 
NOTICE.txt
NOTICE.txt
 
 
README.md
README.md
 
 
RELEASE-NOTES.md
RELEASE-NOTES.md
 
 
SECURITY.md
SECURITY.md
 
 
checkstyle-header.txt
checkstyle-header.txt
 
 
checkstyle-import-control.xml
checkstyle-import-control.xml
 
 
checkstyle-suppressions.xml
checkstyle-suppressions.xml
 
 
checkstyle.xml
checkstyle.xml
 
 
doap_log4j2.rdf
doap_log4j2.rdf
 
 
findbugs-exclude-filter.xml
findbugs-exclude-filter.xml
 
 
jenkins-toolchains-win.xml
jenkins-toolchains-win.xml
 
 
jenkins-toolchains.xml
jenkins-toolchains.xml
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 
toolchains-docker.xml
toolchains-docker.xml
 
 
toolchains-jenkins-ubuntu.xml
toolchains-jenkins-ubuntu.xml
 
 
toolchains-jenkins-win.xml
toolchains-jenkins-win.xml
 
 
toolchains-sample-linux.xml
toolchains-sample-linux.xml
 
 
toolchains-sample-mac.xml
toolchains-sample-mac.xml
 
 
toolchains-sample-win.xml
toolchains-sample-win.xml
 
 

Repository files navigation

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.

About

log4j2

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.