Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Logger output in eclipse for a java project

in one of my elicpse project I have come across this logger related snippet, I noticed that it is from slf4j library.

private static final Logger logger = LoggerFactory
        .getLogger(someclass.class);

Then in some point of the code i noticed this,

logger.debug("Found {} object",
            numberofobject);

My question is, when I run the program I do not see the logger output, how can I see that in eclipse?

like image 656
P basak Avatar asked Jan 29 '26 21:01

P basak


1 Answers

You need to properly configure the binding for slf4j. slf4j is just a facade, not a logging tool.

Since 1.6.0 if no binding is found on the class path, then SLF4J will default to a no-operation implementation.

Have a look at the officiel manual here on how to configure slf4j.

like image 58
Burkhard Avatar answered Feb 01 '26 11:02

Burkhard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!