Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logback tutorial [closed]

Where can I find a Logback tutorial and/or sample projects? Something similar with this "Log4j Tutorial" would be nice.

Note: I am aware of the documentation available on the official Logback website

The Logback Manual

Logback documentation

but is there anything else available?

like image 754
Adrian Avatar asked Nov 20 '09 11:11

Adrian


People also ask

Is Logback affected by log4j?

It indeed brings log4j-api , but it does not bring log4j-core , so our starter is not affected by this vulnerability. These articles have different opinion : 1. slf4j.org/log4shell.html. 2.

Is Log4j2 better than Logback?

Log4j, Logback, and Log4j2 are good logging frameworks that are broadly used. So which one should you use? I recommend using Log4j2 because it's the fastest and most advanced of the three frameworks. Logback is still a good option, if performance is not your highest priority.

Does slf4j use Logback?

Native implementation of slf4j is logback, thus using both as logger framework implies zero memory and computational overhead.

How do I enable DEBUG in Logback?

debug=true to enable debugging of the logback setup. Unfortunately, there is no way to enable debugging via a System property. You have to use <configuration debug="true"> in the logback.


1 Answers

To me, the java sources from the logback-examples of the manual are perfect for this purpose. Not sure you can find better stuff than the genuine samples from the author.

like image 81
Pascal Thivent Avatar answered Oct 26 '22 04:10

Pascal Thivent