SpringBoot 2.x中英文配置详解



此示例文件作为指导提供。请勿将其全部内容复制到您自己的应用程序中。^^^

英文配置

# ===================================================================
# COMMON SPRING BOOT PROPERTIES
#
# This sample file is provided as a guideline. Do NOT copy it in its
# entirety to your own application.               ^^^
# ===================================================================


# ----------------------------------------
# CORE PROPERTIES
# ----------------------------------------
debug=false # Enable debug logs.
trace=false # Enable trace logs.

# LOGGING
logging.config= # Location of the logging configuration file. For instance, `classpath:logback.xml` for Logback.
logging.exception-conversion-word=%wEx # Conversion word used when logging exceptions.
logging.file= # Log file name (for instance, `myapp.log`). Names can be an exact location or relative to the current directory.
logging.file.max-history=0 # Maximum of archive log files to keep. Only supported with the default logback setup.
logging.file.max-size=10MB # Maximum log file size. Only supported with the default logback setup.
logging.level.*= # Log levels severity mapping. For instance, `logging.level.org.springframework=DEBUG`.
logging.path= # Location of the log file. For instance, `/var/log`.
logging.pattern.console= # Appender pattern for output to the console. Supported only with the default Logback setup.
logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS # Appender pattern for log date format. Supported only with the default Logback setup.
logging.pattern.file= # Appender pattern for output to a file. Supported only with the default Logback setup.
logging.pattern.level=%5p # Appender pattern for log level. Supported only with the default Logback setup.
logging.register-shutdown-hook=false # Register a shutdown hook for the logging system when it is initialized.

中文配置

#================================================= ================== 
#COMMON SPRING BOOT PROPERTIES 

#---------------------------------------- 
#核心属性
#----- ----------------------------------- 
debug = false #启用调试日志。
trace = false #启用跟踪日志。

#LOGGING 
logging.config = #日志配置文件的位置。例如,Logback的`classpath:logback.xml`。
logging.exception-conversion-word =%wEx #记录异常时使用的转换字。
logging.file = #日志文件名(例如`myapp.log`)。名称可以是确切的位置或相对于当前目录。
logging.file.max-history = 0 #要保留的归档日志文件的最大数量。仅支持默认的登录设置。
logging.file.max-size = 10MB #最大日志文件大小。仅支持默认的登录设置。
logging.level。* =#日志级别严重性映射。例如`logging.level.org.springframework = DEBUG`。
logging.path = #日志文件的位置。例如,`/ var / log`。
logging.pattern.console = #输出到控制台的Appender模式。仅使用默认的Logback设置支持。
logging.pattern.dateformat = yyyy-MM-dd HH:mm:ss.SSS #日志格式的Appender模式。仅使用默认的Logback设置支持。
logging.pattern.file = #输出到文件的Appender模式。仅使用默认的Logback设置支持。
logging.pattern.level =%5p #日志级别的Appender模式。仅使用默认的Logback设置支持。
logging.register-shutdown-hook = false #为日志记录系统初始化时注册一个关闭钩子。

附件下载:SpringBoot 2.x中英文配置详解.zip

爪哇笔记

作者: 小柒

出处: https://blog.52itstyle.vip

分享是快乐的,也见证了个人成长历程,文章大多都是工作经验总结以及平时学习积累,基于自身认知不足之处在所难免,也请大家指正,共同进步。

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出, 如有问题, 可邮件(345849402@qq.com)咨询。