我正在使用logback api并在我的类路径中有一个logback.xml,看起来像这样
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration scan="true">
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
<appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="FILE">
<file>/${path}/logs/application.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/${path}/logs/application.%i.log</fileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>50MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
</encoder>
</appender>
<!-- ~~~ PERFORMANCE TRACKING LOGGER CONFIGURATION (USING PERF4J) || END ||~~~
-->
<logger name="com.nucleus">
<level value="DEBUG"/>
<!-- <appender-ref ref="STDOUT" /> -->
<appender-ref ref="FILE"/>
</logger>
<logger level="DEBUG" name="org.hibernate.transaction.JDBCTransaction"/>
<logger level="DEBUG" name="org.hibernate.jdbc.ConnectionManager"/>
<logger level="DEBUG" name="org.springframework.orm.jpa.JpaTransactionManager"/>
<!-- <root level="info">
<appender-ref ref="FILE" />
</root> -->
</configuration>
现在我实施的回滚仅在生产环境中不起作用。我希望调试相同,因此想要为此logback api添加跟踪。任何人都可以建议我可能做错了什么或我该怎么做才能解决这个问题?