v0.10.0
- Added logging.
- Added
SlackRequestContext.Current
to provide static access to the current request context.Current
throws if not in a request context, so depending on where you use it, you'll want to checkIsAvailable
first. - Added
RequestId
toSlackRequestContext
, which provides a unique ID for the current request. - Added
RequestId
toRawSocketMessage
andSocketMessage
. - Fixes and extra properties for the
OpenIdApi.Token
API.
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.AspNetCore
now depends on theMicrosoft.Extensions.Logging.Abstractions
package.SlackRtmClient
requires anILogger
when constructed with specific services.CoreSocketModeClient
requires anILogger
when constructed with specific services.SlackSocketModeClient
requires anILogger
when constructed.
Thankyou to @objmj-itminds for the Open ID improvements ✨