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

Custom compressed file names #93

Closed
Ciph3r-Zer0 opened this issue Jul 8, 2023 · 4 comments
Closed

Custom compressed file names #93

Ciph3r-Zer0 opened this issue Jul 8, 2023 · 4 comments

Comments

@Ciph3r-Zer0
Copy link

I've read the docs but could not find any reference on how can we change naming convention on the compressed files
Currently It generates something like this '20230709-0108-01-app.log.gz' Bbut I want to change it

@iccicci
Copy link
Owner

iccicci commented Jul 10, 2023

Hi @Ciph3r-Zer0 ,

it seems when you read the docs you've missed the filename paragraph 😉

If you use a string, the default filename generator function is used, otherwise you can provide your own filename generator function to completely customize the generated file names.

If this helps, please feel free to close this issue.

@Ciph3r-Zer0
Copy link
Author

Hello, thanks for replying
yes this solves my problem, but why is there 2 file.log files in the directory now?
The first file is called file.log which is the current log file
But the second file is called file.log.txt which contains the path for compressed files like this:
logs\1402-02-19_23-46-00_1.log.gz logs\1402-02-19_23-46-05_1.log.gz logs\1402-02-19_23-46-10_1.log.gz logs\1402-02-19_23-46-15_1.log.gz logs\1402-02-19_23-46-20_1.log.gz logs\1402-02-19_23-46-25_1.log.gz logs\1402-02-19_23-46-30_1.log.gz logs\1402-02-19_23-46-35_1.log.gz

@iccicci
Copy link
Owner

iccicci commented Jul 10, 2023

Hi @Ciph3r-Zer0 ,

it seems the .txt file is the history file; if you use maxFiles or maxSize that file contains the history of the files to check to respect the limits.

Its name can be customized through the history option.

@Ciph3r-Zer0
Copy link
Author

Yeap, it worked. Thanks

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