我希望在将关键信息传递到某个资源(URL)时禁用日志记录。
答案 0 :(得分:5)
您可以在.yml文件中基于每个类设置日志记录级别。例如,以下内容:
# Logging settings.
logging:
# The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
level: INFO
# Logger-specific levels.
loggers:
# Overrides the levels of certain packages or files.
"com.my.resources.User": OFF