serilog-contrib / Serilog.Sinks.Logz.Io

Apache License 2.0
15 stars 11 forks source link

Stops logging after around 12 hours #22

Closed lukos closed 2 years ago

lukos commented 2 years ago

This has been logging fine to logz.io since it was deployed last night at 10pm, after around 12 hours, the logs have completely stopped with no changes made to the app.

New apps which have been deployed since then work OK and using the older versions of the apps on other servers also send the logs correctly.

The buffer files also stopped around 9:30 this morning so I suspect it must be related to Serilog rather than this shipper but I am not sure how to debug it since it was all fine to start with and I would imagine that Serilog runs as part of the web application and not as a separate application that could fail?

lukos commented 2 years ago

OK, so the problem is that the default value for bufferFileSizeLimitBytes is 100MB and it is not clear in readme.md that the default settings are the time-based durable log and that the max file size is relevant, even when using time-based file rolling.

It would be useful to add all of the config parameters to the appsettings.json examples with their default values and make a note that all of them except requestUri are optional but are shown with their default parameters so that people are aware of what is happening under the covers?

Happy to create a PR if you would prefer?

mantasaudickas commented 2 years ago

Please do PR, I will be happy to accept it :)

mantasaudickas commented 2 years ago

I have tried to improve README.md. Also changed default value of bufferPathFormat from "Buffer-{Date}.json" to "Buffer-{Hour}.json". This should roll over buffer file every hour. For further information, please read: https://github.com/FantasticFiasco/serilog-sinks-http/wiki/Durable-time-rolled-HTTP-sink