Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep filename extension in rotation #513

Open
inikulshin opened this issue Aug 13, 2019 · 4 comments
Open

Keep filename extension in rotation #513

inikulshin opened this issue Aug 13, 2019 · 4 comments

Comments

@inikulshin
Copy link

Insert file index before filename extension (if exist) and get

filename.0.log
filename.1.log
filename.2.log

instead of

filename.log.0
filename.log.1
filename.log.2
@lukebakken
Copy link
Contributor

On my FreeBSD 12 system, the index comes at the end of the rotated name
(freebsd-var-log.txt). logrotate appears to allow preserving the extension if you specify it.

@inikulshin is there a specific problem you're trying to solve?

@inikulshin
Copy link
Author

inikulshin commented Aug 13, 2019

Excuse me, I should have mentioned, that I'm working with Windows, which gives special attention to extensions.

E. g. I can define automatic opening of *.log files with some text editor. But .0, .1, etc. - are unknown extensions and double clicking on such files (in explorer) opens dialog with programs list, where I should choose the desired text editor. At least once for each number.

@lukebakken
Copy link
Contributor

lukebakken commented Aug 13, 2019

OK, thanks for the explanation. The fastest way to get this implemented would be to submit a pull request with tests.

A workaround on Windows would be to set your text editor as the application for files ending in .0, .1, etc

@inikulshin
Copy link
Author

A workaround on Windows would be to set your text editor as the application for files ending in .0, .1, etc

Sure, that's why I wrote "At least once for each number" and not "Every time" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants