-
Notifications
You must be signed in to change notification settings - Fork 10.5k
FileLoggerProcessor write to a new file on new instance or Fields change #34652
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
Conversation
| _path = loggerOptions.LogDirectory; | ||
| } | ||
|
|
||
| _fileName = loggerOptions.FileName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the file name changes should the file number reset, or be rescanned for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think so, that'd be a way for users to get around the 10,000 file a day limit if they wanted to. But it might be somewhat tricky - e.g. OnChange fires in the middle of execution of WriteMessagesAsync, causing the FileNumber to go back to zero. If this happens while we're scanning through some previous files to find out if they exist, it could cause us to suffix the first file with the new name with something nonzero. I'll file a follow-up issue for this one, for now I think it's fine if the numbering for the new file names pick up where the old ones left off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Updated for feedback |
Fixes #34595