官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 临泉县| 台南市| 定襄县| 抚州市| 宿松县| 丘北县| 普兰县| 马关县| 肥乡县| 保康县| 恩施市| 溧水县| 上饶市| 恩平市| 新宾| 乌鲁木齐市| 汝南县| 新营市| 韶关市| 钟祥市| 嘉义市| 大化| 阜康市| 施甸县| 柯坪县| 萨嘎县| 静乐县| 邯郸县| 稷山县| 邯郸市| 始兴县| 五寨县| 阆中市| 玉山县| 凉山| 丽水市| 岳普湖县| 尖扎县| 内江市| 中牟县| 新闻|