vy commented on issue #3965:
URL:
https://github.com/apache/logging-log4j2/issues/3965#issuecomment-3455179419
@mourya-satyam-888, thanks for providing more context, much appreciated.
I can observe the logrotate behavior you shared:
$ cd /tmp/logrotate-workbench
$ ls -la --time-style=long-iso
total 64
drwxrwxr-x 2 root root 4096 2025-10-28 09:23 .
drwxrwxrwt 107 root root 49152 2025-10-28 09:20 ..
-rw-rw-r-- 1 vy vy 1025 2015-10-28 09:16 foo.log
-rw------- 1 root root 104 2025-10-28 09:06 logrotate.conf
$ sudo cat logrotate.conf
/tmp/logrotate-workbench/foo.log {
size 1k
rotate 4
compress
missingok
notifempty
}
$ sudo logrotate --state ./logrotate.state --force ./logrotate.conf
$ ls -la --time-style=long-iso foo*
-rw-rw-r-- 1 vy vy 1048 2015-10-28 09:16 foo.log.1.gz
Note that `foo.log` of 2015 is rotated to `foo.log.1.gz` of, again, 2015. I
guess we can implement a similar behavior in Log4j by adapting
`PosixViewAttributeAction`.
@mourya-satyam-888, would you be interested in contributing this feature?
You can either do this in isolation, or we can assist you. Either case, I
strongly advise you to outline your plan before writing any lines of code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]