Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable Spring Boot logging configuration?

I am using Spring Boot and want to completely disable the automatic logging configuration and use SLF4J and logback directly instead.

I've tried the following:

@EnableAutoConfiguration(exclude={LoggingApplicationListener.class})

Which didn't work. Is there a way to completely disable the spring boot logging configuration?

like image 820
binarylegit Avatar asked Dec 02 '25 01:12

binarylegit


1 Answers

I believe that Spring uses a property that overrides the configuration set by default and the annotation you're using.

I once had the same problem and I solved it by specifying the following:

-Dlogging.config=log4j-live.xml -Dlog4j.debug

Let me know if that works for you.

like image 119
Marcelo Tataje Avatar answered Dec 04 '25 18:12

Marcelo Tataje



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!