Spring boot's application.properties global configuration

  • Log related configuration
    # Custom log configuration path
    logging.config=classpath:logging-config.xml
    
    # Use at the same time, only logging.file takes effect
    logging.file=my.log // absolute path or relative path
    logging.path=/var/log // set directory
    # level control
    # The default level is: ERROR, WARN, INFO, and it will be split once at 10MB
    # 格式logging.level.* = LEVEL
    # TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF
    logging.level.root=WARN
    logging.level.com=DEBUG
    1. Different log systems spring read different default log configuration file names
        Logback: logback-spring.xml, logback-spring.groovy, logback.xml, logback.groovy Log4j: log4j-spring.properties, log4j-spring.xml , log4j.properties, log4j.xml Log4j2: log4j2     -spring.xml, log4j2.xml
       

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324992253&siteId=291194637
Recommended