All Projects → apache → Logging Log4j2

apache / Logging Log4j2

Licence: apache-2.0
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.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Logging Log4j2

Humblelogging
HumbleLogging is a lightweight C++ logging framework. It aims to be extendible, easy to understand and as fast as possible.
Stars: ✭ 15 (-98.68%)
Mutual labels:  library, logging
Hellobooks
A Single-Page Library Management App built with nodejs, express and react and redux
Stars: ✭ 37 (-96.73%)
Mutual labels:  api, library
Belogging
Easy and opinionated logging configuration for Python apps
Stars: ✭ 20 (-98.23%)
Mutual labels:  library, logging
Yasumi
The easy PHP Library for calculating holidays
Stars: ✭ 788 (-30.45%)
Mutual labels:  api, library
Hadotnet
🏡 A .NET Standard library for Home Assistant.
Stars: ✭ 52 (-95.41%)
Mutual labels:  api, library
Abclinuxuapi
API for http://abclinuxu.cz.
Stars: ✭ 8 (-99.29%)
Mutual labels:  api, library
Restless
Express.js api, type safe validations and more
Stars: ✭ 32 (-97.18%)
Mutual labels:  api, library
Jikan
Unofficial MyAnimeList PHP+REST API which provides functions other than the official API
Stars: ✭ 531 (-53.13%)
Mutual labels:  api, library
Plog
Portable, simple and extensible C++ logging library
Stars: ✭ 1,061 (-6.35%)
Mutual labels:  library, logging
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-95.5%)
Mutual labels:  api, logging
Python Colorlog
A colored formatter for the python logging module
Stars: ✭ 676 (-40.34%)
Mutual labels:  library, logging
Adrestia
APIs & SDK for interacting with Cardano.
Stars: ✭ 56 (-95.06%)
Mutual labels:  api, library
Instagram Api
Instagram's private API
Stars: ✭ 5,168 (+356.13%)
Mutual labels:  api, library
Gitter Api
[production-ready] Gitter API implementation for php 7.0+ allowing sync, async and streaming access.
Stars: ✭ 11 (-99.03%)
Mutual labels:  api, library
Libtmux
⚙️ python api for tmux
Stars: ✭ 599 (-47.13%)
Mutual labels:  api, library
Python Common Cache
This project is a cache component based on the memory and it is lightweight, simple and customizable. 🐍 😃
Stars: ✭ 21 (-98.15%)
Mutual labels:  api, library
Faster
Fast persistent recoverable log and key-value store + cache, in C# and C++.
Stars: ✭ 4,846 (+327.71%)
Mutual labels:  library, logging
Instapy Cli
✨ Python library and CLI to upload photo and video on Instagram. W/o a phone!
Stars: ✭ 498 (-56.05%)
Mutual labels:  api, library
Lara Eye
Filter your Query\Builder using a structured query language
Stars: ✭ 39 (-96.56%)
Mutual labels:  api, library
Webdriver Rust
Library implementing the wire protocol for the W3C WebDriver standard.
Stars: ✭ 56 (-95.06%)
Mutual labels:  api, library

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 build (3.x) Jenkins build (2.x) GitHub build (3.x) GitHub build (2.x) Latest Maven Central release

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 sign 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].