Logging output

Spring Boot logs, by default, to the console, but you can also log to rotating files. You can specify a file or path in application.properties. Let's see the following configuration:

# Use only one of the following properties 
 
# absolute or relative file to the current directory 
logging.file=accounts.log 
 
# will write to a spring.log file 
logging.path=/var/log/accounts 
Spring Boot can also configure logging by using the appropriate configuration file of the underlying logging framework.

As you have seen how we can customize the logging activity in a Spring Boot application, let's move to the next section and see an alternative to the properties file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.228.138