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

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.

主站蜘蛛池模板: 玉林市| 贵溪市| 岳阳县| 定安县| 海淀区| 嘉兴市| 合水县| 岳普湖县| 亳州市| 延庆县| 达日县| 齐齐哈尔市| 玉溪市| 喜德县| 尚志市| 洛隆县| 林芝县| 郓城县| 合肥市| 巩留县| 宝清县| 环江| 镇宁| 巴彦淖尔市| 涞水县| 高尔夫| 肇东市| 淮北市| 唐河县| 双桥区| 林西县| 南开区| 五河县| 乡宁县| 黄石市| 开化县| 凉山| 尤溪县| 中山市| 沾化县| 三河市|