Repository navigation
v0.10.0
- Added logging.
- Added
SlackRequestContext.Currentto provide static access to the current request context.Currentthrows if not in a request context, so depending on where you use it, you'll want to checkIsAvailablefirst. - Added
RequestIdtoSlackRequestContext, which provides a unique ID for the current request. - Added
RequestIdtoRawSocketMessageandSocketMessage. - Fixes and extra properties for the
OpenIdApi.TokenAPI.
Logging
The default logger doesn't do anything, so if you want logging, you'll need to implement the ILogger interface and provide it with one of the UseLogger configuration methods. If you're using SlackNet.AspNetCore, the default logger is overridden with an adaptor for the Microsoft.Extensions.Logging logger, which itself can be overridden as necessary.
Implementing ILogger should be fairly straightforward - see the MicrosoftLoggerAdaptor for an example. I've provided a range of ILogEvent extension methods to adapt log events to a variety of formats. All log events have a Category property, and should have a "Source" message property, which can be used for filtering and determining the appropriate verbosity.
Breaking Changes
SlackNet.AspNetCorenow depends on theMicrosoft.Extensions.Logging.Abstractionspackage.SlackRtmClientrequires anILoggerwhen constructed with specific services.CoreSocketModeClientrequires anILoggerwhen constructed with specific services.SlackSocketModeClientrequires anILoggerwhen constructed.
Thankyou to @objmj-itminds for the Open ID improvements ✨