serilog-contrib / serilog-sinks-slackclient

Slack Sink for Serilog
Apache License 2.0
27 stars 15 forks source link

Support message formatting via outputTemplate #9

Open zaha opened 7 years ago

zaha commented 7 years ago

Hi,

first of all: Cool sink. We recently introduced Slack in our company and I would love to output Error/Fatal log messages into a channel. I managed to do so with this sink in minutes. 👍

While fiddling around with it I tried to set an outputeTemplate parameter to control the rendered text messages in the logs, but couldn't find any such parameter. Does this sink not support this? I want to have several web services log into a single channel and without contextual information like the SourceContext or a RequestID in the log message it would be impossible to tell from which web service a log came or what's related.

I saw that I could provide my own custom RenderMessageMethod, but why not support the typical way to format log messages in Serilog? Or am I missing something?

Kind regards Michael

marcio-azevedo commented 7 years ago

Hi @zaha, thanks for the post.

I need to check, but I think it might support this (and should be easy to change), the only problem is my availability to help with it in the next weeks. So if you want to contribute, feel free and let me know. Otherwise I'll try to provide that in the upcoming weeks.

Regards, Márcio