zoukankan      html  css  js  c++  java
  • logging.file.name, logging.file.path 不能同时生效

    看一下spring的官网方文档

    logging.file.namelogging.file.pathExampleDescription
    (none) (none)   Console only logging.
    Specific file (none) my.log Writes to the specified log file. Names can be an exact location or relative to the current directory.
    (none) Specific directory /var/log Writes spring.log to the specified directory. Names can be an exact location or relative to the current directory.

    logging.file.name 可以指定路径和log文件的名字

    logging.file.path 只可以只当log的路径, 不能指定log的名字, 使用缺省值spring.log

    二者只可以存在一个

    #log levels

    • 设置日志级别

    logging:
      level:
        root: debug #指定根日志记录级别, 即全局
        com.chz.controller: trace #指定包日志记录级别
    debug: true #输出更多装配信息, 但是日志不会被设为debug level

    #log groups

    • 管理不同包的统一日志级别

    logging:
      level:
        my: error
      group:
        my: [com.chz.controller, com.chz.entity]

    #自定义日志文件

    Logging SystemCustomization
    Logback logback-spring.xml, logback-spring.groovy, logback.xml, or logback.groovy
    Log4j2 log4j2-spring.xml or log4j2.xml
    JDK (Java Util Logging) logging.properties
     
  • 相关阅读:
    ArcMap导出图层属性为excel表
    ArcMap面转为线
    vue(18)声明周期函数
    geoserver发布mbtiles文件
    docker部署geoserver
    vue(17)组件插槽slot的使用
    vue(16)父子组件之间直接相互访问
    MySQL常用查询语句积累
    数据库的基本设计
    HashMap学习
  • 原文地址:https://www.cnblogs.com/kikochz/p/12800934.html
Copyright © 2011-2022 走看看