Using Logback

In this lesson, you will learn about using Logback.

Logback #

Logback is intended as a successor to the popular log4j project that is used for logging to console and file. The main advantage of using logback over log4j is that its internals has been re-written to perform about ten times faster and has a smaller memory footprint as well.

Here, we can find a reason to use logback over log4j.

Dependency to add #

Maven #

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>1.2.3</version>
</dependency>

Gradle #


compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'

A sample ...