fluent / NLog.Targets.Fluentd

Apache License 2.0
44 stars 31 forks source link

Enable asynchronous operation #15

Closed PiotrPS closed 10 months ago

PiotrPS commented 11 months ago

I had planned to use the NLog.Targets.Fluentd target in my projects. However, I have encountered an issue with it. Messages sent to Fluentd are being sent synchronously, which is causing a slowdown in the main process. Furthermore, in cases where Fluentd is unavailable, the flow is blocked until a timeout is reached.

I have made modifications to the project to enable asynchronous operation and have added basic buffering to ensure that logs are not lost when the application is stopped.

Please let me know if you would be interested in incorporating such a feature.

PiotrPS commented 10 months ago

Looks like I didn't do my homework correctly. https://github.com/NLog/NLog/wiki/AsyncWrapper-target