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

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.

主站蜘蛛池模板: 观塘区| 山阴县| 鱼台县| 界首市| 珠海市| 师宗县| 根河市| 尚志市| 邯郸县| 那坡县| 重庆市| 大庆市| 吉木乃县| 内丘县| 静乐县| 饶阳县| 班玛县| 常山县| 青川县| 浙江省| 子长县| 宝清县| 汤原县| 鹿泉市| 胶南市| 霞浦县| 江津市| 定安县| 商水县| 林口县| 天祝| 辽阳市| 土默特右旗| 桦南县| 贵港市| 鄂尔多斯市| 吴桥县| 泰安市| 岳普湖县| 台湾省| 萝北县|