Log files are missing/deleted during log rotation

When using filebeat version 7.0.0, the latest log files are missing after rotation.

I am using logback + slf4j for logging, log rotation in tomcat
This does not happen always, but randomly
When not running filebeat I am not facing this problem

This always happens during log rotation
Following is my logback configuration

<appender name="FILE"
	class="ch.qos.logback.core.rolling.RollingFileAppender">
	<append>true</append>
	<File>${yyy}/logs/xxx.log</File>

	<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
		<fileNamePattern>${yyy}/logs/xxx.log.%i.zip
		</fileNamePattern>
		<minIndex>1</minIndex>
		<maxIndex>10</maxIndex>
	</rollingPolicy>
	<triggeringPolicy
		class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
		<maxFileSize>100MB</maxFileSize>
	</triggeringPolicy>
	<encoder>
		<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}][%level][%thread][%contextName][%class][%M][%msg]%n</pattern>
	</encoder>
</appender>
<appender name="Async-Appender" class="ch.qos.logback.classic.AsyncAppender">
	<appender-ref ref="FILE" />
	<includeCallerData>true</includeCallerData>
</appender>

Following is my filbeat configuration

  • type: log
    enabled: true
    paths:
    • C:\yyy\xxx.log
      fields:
      type: xxx
      document_type: xxx_log
      tail_files: true
      multiline.pattern: '^['
      multiline.negate: true
      multiline.match: after

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.