Skip to content
Advertisement

spring-boot – turn off console logging

Want to configure a spring-boot (1.3.5) application to send log-output only to a file — turn off the console.

It looks very easy, according to the docs: howto-logging.html — section ยง 72.1.1 Configure logback for file only output

But I just cannot get this to work — it still logs both to file and console, whatever I try. Been googling for hours, but cannot find any suggestion that actually works.

Any clue what the issue might be?

EDIT: Please dont mark this as “duplicate” — I have read them all — and none of the suggested solutions work here.

Advertisement

Answer

Finally — I found the bug… This is a multi-module build, and turned out in one sub-module, there was also a logback.xml, that apparently took priority over the logback-spring.xml that I was fiddling with. When I excluded the other file from the build, it finally worked as expected. Phew….

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement