DataDog / serilog-sinks-datadog-logs

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/
Apache License 2.0
60 stars 42 forks source link

Remove SelfLog.WriteLine in cases where no error occured. #33

Closed mbp closed 4 years ago

mbp commented 4 years ago

The sink is quite chatty to the console. However SelfLog should only be used in cases of problems/errors. That is the case in other serilog sinks.

gaetan-deputier commented 4 years ago

Hello @mbp ! Thanks for contributing! I agree that the selflog for each successful log line is overkill. I'd rather leave the config logs as those can be helpful and not too verbose. Wdyt?

mbp commented 4 years ago

If you look at sinks in other repositories, you will notice that they only use SelfLog for error cases:

Examples: https://github.com/serilog/serilog-sinks-elasticsearch/search?utf8=%E2%9C%93&q=SelfLog&type= https://github.com/serilog/serilog-sinks-file/search?q=SelfLog&unscoped_q=SelfLog

I would prefer if all mentioned in this PR were removed (maybe in case of errors, you can log the config). But absolutely the "Sending payload to Datadog" is the worst and only required for us to be removed right now. We can live with the others, if you still want the Creating HTTP/TCP client with config ones.

gaetan-deputier commented 4 years ago

Fair enough, the value is small.