0

I'm using logging provided by Spring Boot in an application.yml like this:

logging:
  file: log/info.log
  level.com.mycompany.app: INFO

What I actually want is:

1) Log every DEBUG message from our application (com.mycompany.app) to debug.log, (optional: every INFO message from the whole app / ROOT to debug.log, too)

2) log every INFO message from the whole app / ROOT to info.log

So in pseudo code, it should look like this:

logging:
  level: DEBUG
    file: debug.log
    com.mycompany.app: DEBUG
  level:
    ROOT: INFO
    file: debug.log 

  level:
    ROOT: INFO
    file: info.log

How can I achieve this? Please note, we're using SLF4j, not logback (I've read in other threads about logback for writing to multiple files).

Regards, Bernhard

Bernie
  • 1,607
  • 1
  • 18
  • 30
  • Duplicate question http://stackoverflow.com/questions/5950557/good-examples-using-java-util-logging – Mike3355 Nov 24 '16 at 13:43
  • Thanks for your comment. The link you provided, is about using java.util.Logging in general and in a programmatical way. So that doesn't apply to this question about using a logger in Spring Boot (application.yml). – Bernie Nov 24 '16 at 16:12

0 Answers0