Home » Enterprise Java » Logback


Logback Mapped Diagnostic Contexts (MDC) Example

In the client-server or web applications, log statements that belong to distinct client’s request are mixed and it is hard to trace them separately. The Mapped Diagnostic Context ( MDC ) in the Logback is a great way to differentiate them. In this post, we will explain the MDC and show you who to use it in the Logback. Logback ...

Read More »

Logback Additivity Example

If you use Logback or Log4j logging framework, you may come across some situations that you realize too much or too little log messages on the console or in a file. But you don’t actually understand how it happens. It is probably the consequence of the additivity attribute in the logging framework. So in this post, we shall discuss the ...

Read More »

Logback File Appender Example

Logging is a common and essential issue for software development. Logging allows you to analyse the program execution flow, to detect the bugs and warnings in the code. So logs are frequently the best (and sometimes the only) source of information about a running program. In this example, we are going to show you how to record log messages in ...

Read More »

Logback Syslog Example

Logging is an essential part of a program. We can trace the flow of the program, we can find out the root cause of a bug in the program. Logs are like our guide book when we need to explore what is happening and what was happened in the code. In this post, we shall show you how to transmit ...

Read More »

Logback Configuration Example

In this post, we are going to show you how to configure your application to use slf4j and logback as logger solution. 1. What is logback? Logback is intended as a successor to the popular log4j project. It was designed by Ceki Gülcü, log4j’s founder. It builds upon a decade of experience gained in designing industrial-strength logging systems. The resulting ...

Read More »