I use Spring Boot and want it to write log output to a file.
According to the docs, this is simply done by setting
logging.file=filename.log
<
In my case I pasted some typical config and somehow most probably messed my logging pattern (logging.pattern.file)
Commenting it out solved my own issue (file was created, but nothing was written in it, even though there was console output and root logging level was set to DEBUG) - no errors were given otherwise.
[edit] In other case (I always seem to bump into this problem), I was referencing a JAR file with classes stripped from a web application (WAR), which contained a logback.xml, not to mention AppInitializer - I suspect AppInitializer wouldn't be a problem, since it has a completely different package name and shouldn't be scanned by Spring auto config.. but logback.xml was being detected, I guess, in the classpath, and messed everything completely. I knew it was a hack to reference a WAR, but I was hoping for a quick fix - fixing that, breaking something else. Mani's answer is related.