I developed a logger package for Nuget. SlackLog is using Slack for logging. This has simple usage. You can look at SlackLog
- When you want to send message to channel on Slack, SlackLog will open channel automatically.
- SlackLog has 6 channel as default. They are info,fatal,warning,error,logsdelete and logsedit. Then, you can use any specific channel for your project.
First of all, you need to register to Slack and you should create Application and Bot Token on Slack. If you do not know how to use create tokens you should look Create and regenerate API tokens
And you should send setting to SLogger class and you can start use SlackLog. Otherway you can implent as middleware.
SLogger logger = new SLogger(new SlackDto.Setting()
{
BotToken = "yourbottoken",
BotName = "LoggerApp",
AppToken = "yourapplicationtoken",
Prefix = "helper-test",
Title = "helper-test",
TitleUrl = "yourinformationsite.com"
});
logger.Slack("test", SlackDto.SlackType.Info);
You can fork this repository to develop Web API included SlackLog. Furthermore, There is a medium article shows how to use SlackLog with more detail.
If you give me your feedback I will be happy.