SpringBoot Logger Posted on 2024-09-03 Edited on 2024-09-27 In SE , SpringBoot 关于如何配置 SpringBoot 中的 Logger,以及如何使用,配置内容在 AOP 部分 logger 日志123456789# application.ymllogging: pattern:# console: "%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n" file: "%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n" level: root: INFO file: name: logs/blog.log 1234567 private static final Logger logger = LoggerFactory.getLogger(LoggerAspect.class); //定义loggerlogger.error("This is an error message");logger.warn("This is a warning message");logger.info("This is an info message");logger.debug("This is a debug message");logger.trace("This is a trace message");