How to disable console logging in spring-boot?

membersound :

I'm using the default logging configuration of spring-boot.

How can I prevent the console output, while keeping the logging into a logfile configured with logging.file=myfile.log?

My goal is to not having console windows output, but only logging to that file.

Without having to create a specific logback.xml configuration. Because I'm using spring-boot for not having to configure the logging myself.

membersound :

It turned out if I set the following property empty, the console logging is disabled:

logging.pattern.console=

Or commenting in xml if you use it

  <!--<root level="error">-->
        <!--<appender-ref ref="console"/>-->
    <!--</root>-->

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=432691&siteId=1