serilog-sinks-slackclient icon indicating copy to clipboard operation
serilog-sinks-slackclient copied to clipboard

Support message formatting via outputTemplate

Open zaha opened this issue 8 years ago • 1 comments

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

zaha avatar Aug 10 '17 13:08 zaha

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

marcio-azevedo avatar Aug 31 '17 10:08 marcio-azevedo