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

RotatingFileHandler: Store complete path in '_created_files' #340

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

jf-0
Copy link
Contributor

@jf-0 jf-0 commented Aug 8, 2023

Previously '_created_files' sometimes stored the full path and sometimes only the filename. This PR fixes that.

The problem is that the logfile is not always located in the working directory.
Basically quill::detail::rename_file() failed sometimes in _rotate_files() and showed an error on the console for the filename-only-files.

Also changed the hardcoded .log extension to fs::extension(). ;)

Previously _created_files had been mixed. Sometimes the full path was stored and sometimes only the filename.

The problem with the filename only method was that there are cases where the logfile is not in the current working directory. Quill failed to rename that file in those cases. Basically quill::detail::rename_file() failed sometimes in _rotate_files() and showed an error on the console for files that did not exist.
@odygrd
Copy link
Owner

odygrd commented Aug 9, 2023

Thanks for the PR! : )

@odygrd odygrd merged commit c995a02 into odygrd:master Aug 9, 2023
25 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants