You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for this great logging implementation — simple yet powerful.
I store my log files in a specific folder structure: \ProjectName\[Year]\[Month]\[Day].txt
I have three questions:
Is the configuration below the correct way to achieve this?
Will the file/folder rotation occur at midnight as expected when using this in an ASP.NET application?
Will the file rotation upon exceeding the size limit follow the formatting rule and handle the day change correctly, examples : \ProjectName\2024\08\09.txt \ProjectName\2024\08\091.txt \ProjectName\2024\08\092.txt \ProjectName\2024\08\10.txt
Will the file/folder rotation occur at midnight as expected when using this in an ASP.NET application?
I guess you're referring to "rolling file" behaviour. It works as long as your "FormatLogFileName" returns the same value. When it returns a new value, this automatically creates a new log file, and if this new path is for another (new and empty) folder everything retated to rolling starts from the beginning.
Will the file rotation upon exceeding the size limit follow the formatting rule and handle the day change correctly, examples :
It's easy to predict rolling files behaviour by realizing that all this logic works only when "FormatLogFileName" returns the same value, and in this case the behaviour is the same as if LogFileName is hardcoded (like 'test.log'). New day leads to a new LogFileName, and everything that was before that doesn't matter for rolling file behaviour.
First of all, thank you for this great logging implementation — simple yet powerful.
I store my log files in a specific folder structure: \ProjectName\[Year]\[Month]\[Day].txt
I have three questions:
Is the configuration below the correct way to achieve this?
Will the file/folder rotation occur at midnight as expected when using this in an ASP.NET application?
Will the file rotation upon exceeding the size limit follow the formatting rule and handle the day change correctly, examples :
\ProjectName\2024\08\09.txt
\ProjectName\2024\08\091.txt
\ProjectName\2024\08\092.txt
\ProjectName\2024\08\10.txt
The text was updated successfully, but these errors were encountered: