Skip to content

v0.10.0

Compare
Choose a tag to compare
@soxtoby soxtoby released this 24 Oct 03:35
· 180 commits to master since this release
  • 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 check IsAvailable first.
  • Added RequestId to SlackRequestContext, which provides a unique ID for the current request.
  • Added RequestId to RawSocketMessage and SocketMessage.
  • 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 the Microsoft.Extensions.Logging.Abstractions package.
  • SlackRtmClient requires an ILogger when constructed with specific services.
  • CoreSocketModeClient requires an ILogger when constructed with specific services.
  • SlackSocketModeClient requires an ILogger when constructed.

Thankyou to @objmj-itminds for the Open ID improvements ✨