GUKUN created LOGBACK-1447: ------------------------------ Summary: Logback occasionally repeats printing logs Key: LOGBACK-1447 URL: https://jira.qos.ch/browse/LOGBACK-1447 Project: logback Issue Type: Bug Components: logback-core Affects Versions: 1.1.7 Environment: *List of log jars in my project:*
springframework-3.1.1-RELEASE slf4j-api-1.7.25 jcl-over-slf4j-1.7.25(Used to replace commons-logging-1.0.3) log4j-over-slf4j-1.7.25(Used to replace log4j-1.2.15) logback-core-1.1.7 logback-classic-1.1.7 *logback.xml:* <?xml version="1.0" encoding="UTF-8"?> <configuration debug="false"> <contextName>my-test</contextName> <appender name="logFile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>INFO</level> </filter> <encoder charset="UTF-8"> <ImmediateFlush>false</ImmediateFlush> <pattern>%d\{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %X\{threadId:--}%X\{clientIp} %c\{0}:%L: %m%n</pattern> </encoder> <File>c:/test.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>c:/test.log%d\{yyyyMMdd}</fileNamePattern> <maxHistory>2</maxHistory> </rollingPolicy> </appender> <appender name="asyncLogFile" class="ch.qos.logback.classic.AsyncAppender"> <discardingThreshold>0</discardingThreshold> <neverBlock>true</neverBlock> <queueSize>2048</queueSize> <includeCallerData>true</includeCallerData> <appender-ref ref="logFile" /> </appender> <appender name="errorLogFile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <encoder charset="UTF-8"> <ImmediateFlush>false</ImmediateFlush> <pattern>%d\{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %X\{threadId:--}%X\{clientIp} %c\{0}:%L: %m%n</pattern> </encoder> <File>c:/error.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>c:/error.log%d\{yyyyMMdd}</fileNamePattern> <maxHistory>2</maxHistory> </rollingPolicy> </appender> <appender name="asyncErrorLogFile" class="ch.qos.logback.classic.AsyncAppender"> <discardingThreshold>0</discardingThreshold> <neverBlock>true</neverBlock> <queueSize>2048</queueSize> <includeCallerData>true</includeCallerData> <appender-ref ref="errorLogFile" /> </appender> <logger name="RocketmqClient" level="error" /> <logger name="RocketmqRemoting" level="error" /> <logger name="com.ibatis" level="INFO" /> <logger name="java.sql.Connection" level="INFO" /> <logger name="java.sql.Statement" level="INFO" /> <logger name="java.sql.PreparedStatement" level="INFO" /> <root level="INFO"> <appender-ref ref="asyncLogFile" /> <appender-ref ref="asyncErrorLogFile" /> </root> </configuration> Reporter: GUKUN Assignee: Logback dev list Priority: Blocker Hello,good programmers! When high concurrency, the log will be printed twice: like this: 2019-01-01 14:11:55.*766* [INFO ] <T=L0MW82ZxY002Fupw><IP=10.55.63.113> GSOneAuthSource:111: loginName=testetsss,auth in redis,authResult=true 2019-01-01 14:11:55.*767* [INFO ] <T=L0MW82ZxY002Fupw><IP=10.55.63.113> GSOneAuthSource:111: loginName=testetsss,auth in redis,authResult=true I need your help to solve this problem. thanks! -- This message was sent by Atlassian JIRA (v7.3.1#73012) _______________________________________________ logback-dev mailing list logback-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-dev