The reliable, generic, fast and flexible logging framework for Java.

Related tags

Logging logback
Overview

About logback

Thank you for your interest in logback, the reliable, generic, fast and flexible logging library for Java.

The Logback documentation can be found on the project web-site as well as under the docs/ folder of the logback distribution.

Building logback

Version 1.3.x requires Java 9 to compile and build.

More details on building logback is documented at:

https://logback.qos.ch/setup.html#ide

In case of problems

In case of problems please do not hesitate to post an e-mail message on the [email protected] mailing list. However, please do not directly e-mail logback developers. The answer to your question might be useful to other users. Moreover, there are many knowledgeable users on the logback-user mailing lists who can quickly answer your questions.

Pull requests

If you are interested in improving logback, great! The logback community looks forward to your contribution. Please follow this process:

  1. Please file a bug report. Pull requests with an associated JIRA issue will get more attention.

    Optional: Start a discussion on the logback-dev mailing list about your proposed change.

  2. Fork qos-ch/logback. Ideally, create a new branch from your fork for your contribution to make it easier to merge your changes back.

  3. Make your changes on the branch you hopefuly created in Step 2. Be sure that your code passes existing unit tests.

  4. Please add unit tests for your work if appropriate. It usually is.

  5. Push your changes to your fork/branch in github. Don't push it to your master! If you do it will make it harder to submit new changes later.

  6. Submit a pull request to logback from from your commit page on github.

Build Status

Build Status

Issues
  • SSL hostname verification

    SSL hostname verification

    When using SSL, there currently is no hostname verification: distinct servers with certificates issued by trusted CAs could impersonate each other.

    This small patch implements hostname verification (using Java 7's "HTTPS" endpoint identification algorithm rules), and turns it on by default. It also adds a configuration to turn it off (dontVerifyHostname):

        <ssl>
            <trustStore>
                <location>classpath:/democa.jks</location>
                <password>demodemo</password>
            </trustStore>
            <parameters>
                <dontVerifyHostname>true</dontVerifyHostname>
            </parameters>
        </ssl>
    

    (I realise this may break some existing configurations, but security by default is generally the right choice.)

    This uses Java's SSLParameters.setEndpointIdentificationAlgorithm(String), which is only available from Java 7. I have therefore implemented it using reflection, which rather unsatisfactory, but works. (I have also silenced the potential reflection exceptions, which is not great, but I wasn't sure how to handle this w.r.t. the rest of the code base.) Hostname verification will still be missing when using Java 6.

    Please note that Java's hostname matching rules follow RFC 2818 quite strictly. In particular, when using an IP address, that IP address MUST be in a Subject Alternative Name (of type IP address), not just in the CN. The documentation should probably reflect this. When using an IP address, instead of using:

    keytool -genkey -alias server -dname "CN=my-logging-server" \
        -keyalg RSA -validity 365 -keystore server.keystore
    

    the -ext san=ip:<THE.IP.ADDRESS> option should be used. For example (assuming the server address is 10.0.0.1):

    keytool -genkey -alias server -dname "CN=10.0.0.1" \
        -ext san=ip:10.0.0.1 \
        -keyalg RSA -validity 365 -keystore server.keystore
    

    This requires keytool from Java 7 or above, but it can produce keystores usable with Java 6.

    Feedback welcome, I don't mind modifying this patch if the pull request cannot be merged as it is.

    opened by harbulot 33
  • Runtime Shutdown Hook for AsyncAppenderBase

    Runtime Shutdown Hook for AsyncAppenderBase

    Added a Runtime Shutdown Hook thread to the AsyncAppenderBase implementation that prevents the AsyncAppender from dropping events under certain conditions (http://mailman.qos.ch/pipermail/logback-user/2014-March/004314.html)

    Unit tests for the functionality of the Hook thread. No way to unit test the shutdown hook itself, but the run() method of the hook thread functions as expected when shutdown conditions are simulated (the worker thread is suspended and elements are pending in the queue).

    opened by mikereinhold 19
  • LOGBACK-848: refactored SocketAppenderBase

    LOGBACK-848: refactored SocketAppenderBase

    Refactored SocketAppenderBase. Now it uses SocketConnector for its (re-)connection logic, and uses an asynchronous task to dispatch events to the remote receiver. A configurable queue is utilized to relay logging events from the append method to the dispatch task. When the queue length is zero (the default), a SynchronousQueue is utilized, preserving the previous appender behavior. When the queue length is greater than zero, a bounded queue is utilized, allowing the appender to efficiently drop logging events when the remote receiver (or network) cannot keep up with the rate of logging events delivered to the appender.

    Please review and merge or provide feedback.

    opened by ceharris 19
  • Escape XML &,

    Escape XML &,",' in XMLLayout (LOGBACK-728)

    XMLLayout does not seem to encode '&' characters (it uses Transform.escapeTags which only escapes '<' and '>'). As a result, it produces broken XML especially when properties are enabled and MDCInsertingServletFilter is used :

    <log4j:data name='req.queryString' value='foo=42&bar=42' />

    opened by randomstuff 15
  • LOGBACK-1326 Allow LayoutWrappingEncoder to have a parent of a type other than Appender

    LOGBACK-1326 Allow LayoutWrappingEncoder to have a parent of a type other than Appender

    See LOGBACK-1326

    This allows LayoutWrappingEncoder to be used within another Encoder.

    The introduction of setParent(Appender) in logback 1.2.1 caused an issue in downstream projects that allow a LayoutWrappingEncoder to be used within another Encoder.

    Specifically: https://github.com/logstash/logstash-logback-encoder/issues/232

    opened by philsttr 14
  • LOGBACK-849: shut down executor service on context reset

    LOGBACK-849: shut down executor service on context reset

    This request addresses LOGBACK-849 using the second approach mentioned in the Jira issue. Please review and merge or provide feedback.

    opened by ceharris 14
  • [LOGBACK-1266] Upgrade Junit to 4.12 and adjustments required to make that happen

    [LOGBACK-1266] Upgrade Junit to 4.12 and adjustments required to make that happen

    • Junit upgraded to 4.12 from 4.10
    • In dependency Management, exclude legacy hamcrest version so 1.3 persists for junit 4.12
    • Logback classic integration.xml now will need hamcrest pulled in. While slf4j auto does that in specific configuration, lean more on maven and have maven just copy slf4j and hamcrest to the lib directory.

    Result, build is succesfully on 4.12 now and builds without issue even with ant integration.xml

    opened by hazendaz 14
  • Logback 929

    Logback 929

    attempt to fix http://jira.qos.ch/browse/LOGBACK-929 basically daemonize threads created by logback's execution context.

    opened by eyalfa 14
  • Fix LOGBACK-885

    Fix LOGBACK-885

    opened by cowwoc 14
  • LBCORE-216 Add a new layout that produces JSON

    LBCORE-216 Add a new layout that produces JSON

    Add a JsonLayout implemented with no external dependencies.

    opened by pmq 11
  • Backport fix for LOGBACK-1027 from 1.3.x.

    Backport fix for LOGBACK-1027 from 1.3.x.

    For users of Logback 1.2.x suffering from LOGBACK-1027, provide a solution by backporting the fix from the master branch.

    opened by ellebrecht 1
  • Update Node.java

    Update Node.java

    add instanceof to cast expr in node.java

    opened by cuixiaoyiyi 0
  • Fixing behavior of logback-access in the modern era

    Fixing behavior of logback-access in the modern era

    • Fixes LOGBACK-1580 to report the proper HttpServletResponse.getStatus() that was used when the response was committed.
    • Works around LOGBACK-1581 in AccessEvent to not fail logging when the HttpServletRequest.getParameterNames() or HttpServletRequest.getParameter(String) methods are used against unread or even bad request objects.
    • Updated Javadoc (needs to be copied over to logback manual though)
    • Must use OpenJDK 1.8 to compile and release.
    • Still compiles to Java 1.6 bytecode for release.
    opened by joakime 0
  • LOGBACK-1582 fix

    LOGBACK-1582 fix

    opened by billkoch 0
  • [LOGBACK-1567] Upgrade to jansi 2.3.4

    [LOGBACK-1567] Upgrade to jansi 2.3.4

    opened by aomsweet 0
  • [LOGBACK-1567] Upgrade to jansi 2.3.4

    [LOGBACK-1567] Upgrade to jansi 2.3.4

    opened by aomsweet 3
  • LOGBACK-1309

    LOGBACK-1309

    Patch for LOGBACK-1309. Just uses URLConnection to get lastModifiedDate instead of forcing a list of old school File objects. This will support scanning form any URL who's URLConnectoin supports getLastModifiedDate()

    opened by lscoughlin 0
Highly efficient garbage-free logging framework for Java 8+

Garbage Free Log Highly efficient garbage-free logging framework for Java 8+. Use Add the following dependencies to your project: implementation 'com.

EPAM Systems 33 Nov 4, 2021
An extensible Java library for HTTP request and response logging

Logbook: HTTP request and response logging Logbook noun, /lɑɡ bʊk/: A book in which measurements from the ship's log are recorded, along with other sa

Zalando SE 1k Dec 1, 2021
Simple Logging Facade for Java

About SLF4J The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging

QOS.CH Sarl 1.8k Dec 4, 2021
Log annotation for logging frameworks

Herald "Why, sometimes I've believed as many as six impossible things before breakfast." - Lewis Carroll, Alice in Wonderland. Herald provides a very

Vladislav Bauer 68 Mar 17, 2021
P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to the application.

p6spy P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to existing application. The P6Spy

p6spy 1.6k Dec 6, 2021
Best-of-breed OpenTracing utilities, instrumentations and extensions

OpenTracing Toolbox OpenTracing Toolbox is a collection of libraries that build on top of OpenTracing and provide extensions and plugins to existing i

Zalando SE 178 Nov 30, 2021
Logstash - transport and process your logs, events, or other data

Logstash Logstash is part of the Elastic Stack along with Beats, Elasticsearch and Kibana. Logstash is a server-side data processing pipeline that ing

elastic 12.5k Dec 2, 2021
Free and open source log management

Graylog Welcome! Graylog is an open source log management platform. You can read more about the project on our website and check out the documentation

Graylog 5.9k Dec 2, 2021
The Apache Software Foundation 1.3k Dec 5, 2021
Best-of-breed OpenTracing utilities, instrumentations and extensions

OpenTracing Toolbox OpenTracing Toolbox is a collection of libraries that build on top of OpenTracing and provide extensions and plugins to existing i

Zalando SE 179 Dec 6, 2021
Log sourcing is method of trying to map all the ERROR and WARN logs you have in your system in a cost effective way.

log-sourcing Log sourcing is method of trying to map all the ERROR and WARN logs you have in your system in a cost effective way. The basic idea is th

Shimon Magal 12 Apr 19, 2021
uniVocity-parsers is a suite of extremely fast and reliable parsers for Java. It provides a consistent interface for handling different file formats, and a solid framework for the development of new parsers.

Welcome to univocity-parsers univocity-parsers is a collection of extremely fast and reliable parsers for Java. It provides a consistent interface for

univocity 813 Nov 20, 2021
Fast and reliable message broker built on top of Kafka.

Hermes Hermes is an asynchronous message broker built on top of Kafka. We provide reliable, fault tolerant REST interface for message publishing and a

Allegro Tech 696 Nov 25, 2021
Tools for working with generic types

TypeTools A simple, zero-dependency library for working with types. Supports Java 1.6+ and Android. Introduction One of the sore points with Java invo

Jonathan Halterman 544 Dec 6, 2021
Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Spring, Spring Boot, CDI.

Camunda Platform - The open source BPMN platform Camunda Platform is a flexible framework for workflow and process automation. It's core is a native B

Camunda BPM 2.4k Dec 5, 2021
A flexible minigame framework for bukkit.

Oyster Subproject of Oni, a framework which focused on minigames. QQ Group What It is a flexible framework that attempts to reduce costs for developin

SaltedFish Club 5 Oct 2, 2021
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

tinylog 2 Example import org.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello

tinylog.org 408 Nov 28, 2021
Highly efficient garbage-free logging framework for Java 8+

Garbage Free Log Highly efficient garbage-free logging framework for Java 8+. Use Add the following dependencies to your project: implementation 'com.

EPAM Systems 33 Nov 4, 2021
Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.

Payara Platform Community Edition Create. Innovate. Elevate. Payara Platform Community Edition features open source server runtimes for development pr

Payara Foundation 807 Nov 29, 2021
💡极致性能的企业级Java服务器框架,RPC,游戏服务器框架,web应用服务器框架。(Extreme fast enterprise Java server framework, can be RPC, game server framework, web server framework.)

?? 为性能而生的万能服务器框架 ?? Ⅰ. zfoo简介 ?? 性能炸裂,天生异步,Actor设计思想,无锁化设计,基于Spring的MVC式用法的万能RPC框架 极致序列化,原生集成的目前二进制序列化和反序列化速度最快的 zfoo protocol 作为网络通讯协议 高可拓展性,单台服务器部署,

null 269 Nov 25, 2021
Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper

Simple Flat Mapper Release Notes Getting Started Docs Building it The build is using Maven. git clone https://github.com/arnaudroger/SimpleFlatMapper.

Arnaud Roger 395 Nov 3, 2021
Financial-level flexible distributed transaction solution

Financial-level flexible distributed transaction solution

dromara 3.8k Dec 6, 2021
Universal, flexible, high-performance distributed ID generator

CosId Universal, flexible, high-performance distributed ID generator 中文文档 Introduction CosId aims to provide a universal, flexible and high-performanc

Ahoo Wang 91 Nov 27, 2021
Efficient reliable UDP unicast, UDP multicast, and IPC message transport

Aeron Efficient reliable UDP unicast, UDP multicast, and IPC message transport. Java and C++ clients are available in this repository, and a .NET clie

Real Logic 5.8k Dec 2, 2021
Efficient reliable UDP unicast, UDP multicast, and IPC message transport

Aeron Efficient reliable UDP unicast, UDP multicast, and IPC message transport. Java and C++ clients are available in this repository, and a .NET clie

Real Logic 5.8k Nov 28, 2021
An extensible Java library for HTTP request and response logging

Logbook: HTTP request and response logging Logbook noun, /lɑɡ bʊk/: A book in which measurements from the ship's log are recorded, along with other sa

Zalando SE 1k Dec 1, 2021
Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor your Java code, the JDK, and 3rd party libraries.

Automon Automon combines the power of AOP (AspectJ) with monitoring tools or logging tools that you already use to declaratively monitor the following

Steve Souza 545 Dec 5, 2021
Simple Logging Facade for Java

About SLF4J The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging

QOS.CH Sarl 1.8k Dec 4, 2021
Log annotation for logging frameworks

Herald "Why, sometimes I've believed as many as six impossible things before breakfast." - Lewis Carroll, Alice in Wonderland. Herald provides a very

Vladislav Bauer 68 Mar 17, 2021