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

Ability to stack error file handlers #52

Open
dkorecko opened this issue Apr 10, 2023 · 1 comment
Open

Ability to stack error file handlers #52

dkorecko opened this issue Apr 10, 2023 · 1 comment

Comments

@dkorecko
Copy link

Essentially, I would think that if in the HandleFileError I add a string to the file name, then if the initial log file is being used by another process and the alternative file name is also being used by a different process, it would just do something like "FileName_alt_alt.log" instead of just crashing on "FileName_alt".

Thoughts?

@VitaliyMF
Copy link
Contributor

I guess you can perform all necessary checks inside your "HandleFileError" handler to choose an alternate file name that is 100% not used. It is definitely more safe than making "HandleFileError" recursive (in some cases this may lead to infinite recursion which is definitely bad design).

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