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
     
  • 相关阅读:
    Activity的singleTask启动模式
    蓝图Tips
    UE4 C++ Tips
    UE4的抛物线
    透明材质
    在UE4 C++构造函数里的常规操作
    UE4的反射关键词
    UE4字符串的各种转换
    UE4Launch遇到的问题
    在UE4C++中的宏
  • 原文地址:https://www.cnblogs.com/kikochz/p/12800934.html
Copyright © 2011-2022 走看看