Skip to content

LastModifiedTime of compressed file is not preserved #3965

@mourya-satyam-888

Description

@mourya-satyam-888

Description

I am using the RollingFileAppender with GZ compression, I have observed that renaming of the file is done correctly but after the compression the modified time is not preserved for the compressed file.
unlike in gzip or logrotate it preserve the Modified time from source.

is there any way to configure this, as per code POSIX action only have file permission, owner and group settings.

There is no explicit way of having same timestamp as source.

Configuration

Version: [Log4j version]
2.17.1

Metadata

Metadata

Assignees

Labels

appenders:RollingAffects log file rolling functionalityenhancementAdditions or updates to features

Type

No type

Projects

Status

To triage

Relationships

None yet

Development

No branches or pull requests

Issue actions