我收到标题错误:LOGBACK: No context given for cqlcore.rolling.SizeAndTimeBasedRollingPolicy@1162810564
在我添加了 Spring Boot 应用程序的最新版本后,我得到了它: logging.file.name =src/main/resources/logs/spring Advance.log 到 application.properties 这工作正常我只是不明白为什么以及 Logback 做什么意思是,如果这是一个错误/警告?以及如何解决?
如果我不将日志保存到日志文件并仅在控制台上打印,我不会收到此错误
这是我完整的application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/example?
createDatabaseIfNotExist=true&serverTimezone=IST
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#Hibernate/Jpa Configuration:
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
#spring.jpa.properties.hibernate.show_sql:true
#spring.jpa.properties.hibernate.format_sql=true
#Log Configuration:
logging.file.name =src/main/resources/logs/spring advance.log
#•Show Sql Statement:
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type=TRACE
#•Show Sql Values:
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} - %msg%n
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} - %msg%n
#Server Port Configuration:
server.port=8080