serilog-sinks-slack
serilog-sinks-slack copied to clipboard
Feature Request: Filtering Logs based on Properties
I have two Slack Sinks that log to different Channels.
One Channel is for logs and the other is for alerts. Like below:
.WriteTo.Slack( webhookUrl: "https://hooks.slack.com/services/hook1", //hook for alerting CST customChannel: "aletr", customUsername: $"alert-bot", customIcon: ":radioactive_sign:", restrictedToMinimumLevel: LogEventLevel.Fatal ) .WriteTo.Slack( webhookUrl: "https://hooks.slack.com/services/hook2", customChannel: "logs", customUsername: $"log-bot", customIcon: ":radioactive_sign:", restrictedToMinimumLevel: LogEventLevel.Error );
Currently I am managing this by making the alert Channels log level as Fatal. But I wan to log Certain Errors as Alerts.
But I cant do that directly as then I will have decrease the logLevel for Alert Channel and it will be polluted by all the Error Logs