Skip to content

[in_tail] tail multiple logs file DailyRollingFileAppender Logback  #3898

Open
@nganbph10804

Description

@nganbph10804

I have read issue #544 and realize my problem is related that.

  • LogBack also uses a RollingFileAppender configure to append a new file every day:

image

  • For disaster recovery, i have to configure fluentd tail last 7 days of logfile:
<source>
  @type tail
    // i want tails current logback file and last 6 days before today
  path /var/log/tomcat/Application.log,
   // last 6 days before file
   /var/log/Application.log.2022-09-*
  follow_inodes true
  path_timezone  "Asia/Tokyo"
  time_format "%Y-%m-%d"
  pos_file /var/log/tomcat/log.pos
  tag tail.multiple
  <parse>
    @type json
  </parse>
</source>

Describe the solution you'd like

Is there any way to solve my problem ?

Describe alternatives you've considered

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature request or improve operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions