ArieGato / serilog-sinks-rabbitmq

Serilog Sink for RabbitMq
Apache License 2.0
53 stars 51 forks source link

Collect the Logs and publish them at once #88

Closed abolfazlmohammadiseif closed 5 years ago

abolfazlmohammadiseif commented 5 years ago

Hi, I'm going to collect all the logs of each request (from the action method to maybe multiple services and classes) and at the end, send them all to RabbitMQ at once!

Is it possible? what is your suggestion?

Thanks alot

(I couldn't chose Question as label, there were just Bug and New Feature)

madslyng commented 5 years ago

That's more or less what Serilog.Sinks.RabbitMq does out of the box. This library uses Serilog's EmitBatch, which bundles up a bunch of logs, and sends them asynchronously from time to time.

Read about Serilog Periodic Batching: https://github.com/serilog/serilog-sinks-periodicbatching

abolfazlmohammadiseif commented 5 years ago

Do you know how to use it? What is the configuration? I couldn't find anyone using that.

madslyng commented 5 years ago

@abolfazlmohammadiseif No, what I mean is, Serilog.Sinks.RabbitMq already implements periodic batching.

abolfazlmohammadiseif commented 5 years ago

I Found how to config it. Thanks

madslyng commented 5 years ago

Happy to hear that. Good luck! :-)