serilog-contrib / serilog-sinks-slackclient

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

Custom Bot Name per Application (One WebHook) #10

Closed cgountanis closed 6 years ago

cgountanis commented 6 years ago

Is this possible? Custom Bot Name per Application (One WebHook)

or

Can I use the render to dynamically add project name to the top of the message?

Core 2 <PackageReference Include="Serilog.Sinks.Slack.Core" Version="0.1.3-beta" />

marcio-azevedo commented 6 years ago

Yes, we already have that in the SlackSink. It just needs to be exposed via LoggerConfigurationSlackExtensions. I'll try to release a new version with that.

marcio-azevedo commented 6 years ago

Try and use this with the latest version: var log = new LoggerConfiguration().WriteTo.Slack("https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", username: "Test User", iconEmoji: Serilog.Sinks.Slack.Core.Sinks.Slack.Client.Emoji.MonkeyFace).CreateLogger();

cgountanis commented 6 years ago

Seems to be working, very nice option set. image