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

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.

主站蜘蛛池模板: 宜丰县| 石城县| 法库县| 屯留县| 莱阳市| 湛江市| 宁明县| 双牌县| 潮安县| 湖口县| 建阳市| 吉安县| 牙克石市| 久治县| 北碚区| 鹿邑县| 开原市| 博野县| 静宁县| 临高县| 南丹县| 太仆寺旗| 大化| 石首市| 朝阳市| 苗栗县| 博罗县| 华容县| 阿瓦提县| 清水县| 阜南县| 九龙县| 翁牛特旗| 大悟县| 双鸭山市| 江安县| 改则县| 富裕县| 曲阜市| 浠水县| 江达县|