File size limit rollover is not happening for Log file sin Umbraco 10.7
Hi All,
I am trying to add rollover the Log files on a daily basis and on a size limit in case the file size increases more than a set size. But it is not working for me
Oh! Could it be that you're declaring an explicit file name in the [path]?
Instead of Serilog creating new files like path/log_{timestamp}.txt - it is writing over the same file again and again?
I had initially typed out this before noticing the extension:
I believe Umbraco uses its own sink called "UmbracoFile"
. I don't know why/how that might affect a Serilog.Sinks.File, which you appear to be using, but this would be my first suspicion. (purely speculative here!)
If nothing else, the UmbracoFile sink might open another option to workaround the issue you're seeing. Good luck - I'm rooting for ya!
Hi Damian,
Thank you for your answer.
It still didn't work. I am not sure where I am making the mistake. I used the exact code from the documentation but it is still not rolling over after the specified size limit.
File size limit rollover is not happening for Log file sin Umbraco 10.7
Hi All,
I am trying to add rollover the Log files on a daily basis and on a size limit in case the file size increases more than a set size. But it is not working for me
I am using the below settings.
Any help or suggestion will be appreciated.
Oh! Could it be that you're declaring an explicit file name in the
[path]
? Instead of Serilog creating new files likepath/log_{timestamp}.txt
- it is writing over the same file again and again?No, initially I tried without explicit file name but it didn't work so I tried with explicit file path. It is not working for both the cases.
Dang, sorry it's not that simple.
I had initially typed out this before noticing the extension:
I believe Umbraco uses its own sink called "UmbracoFile" . I don't know why/how that might affect a
Serilog.Sinks.File
, which you appear to be using, but this would be my first suspicion. (purely speculative here!)If nothing else, the UmbracoFile sink might open another option to workaround the issue you're seeing. Good luck - I'm rooting for ya!
Hi Damian, Thank you for your answer. It still didn't work. I am not sure where I am making the mistake. I used the exact code from the documentation but it is still not rolling over after the specified size limit.
hmmm…just a quick sanity question - are you rebuilding (and therefore reloading) the app after making the config changes?
Hi, Sorry for the late answer got busy with something else. Yes I am rebuilding and then checking it again.
is working on a reply...