log

spring-boot logging (yml파일에서만 설정)

張's blog 2020. 7. 14. 14:04

 

#logging
logging:
  file:
    path: C:/zLOGS
    name: ${logging.file.path}/test.log
    max-history: 7
    max-size: 2KB
  pattern:
    console: "%d{MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}) [%t] %clr(%-40.40logger{39}){cyan} [%L] | %msg%n"

    file: "%d{MM-dd HH:mm:ss.SSS} %clr(${LOG_LEVEL_PATTERN:-%5p}) [%t] %clr(%-40.40logger{39}){cyan} [%L] | %msg%n"
    #console: "%-5level %d{yyyy-MM-dd HH:mm:ss} %logger{999}[line : %line] - %msg%n"

 

https://stackoverflow.com/questions/29764258/why-doesnt-spring-boot-listen-to-the-logging-path-variable

 

why doesn't spring-boot listen to the logging.path variable?

Using spring-boot 1.2.3.RELEASE. The only way I can get spring-boot to log to a specific directory is by setting the "log.file" property like so: logging.file=/var/log/app.log But as far as I ca...

stackoverflow.com