Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Use NullLogger if no logger is specified (fixes #89)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarbettini committed Jun 29, 2017
1 parent 768f1bc commit 70d1a78
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using Stormpath.Owin.Middleware.Okta;
using System.Threading;
using System.Linq;
using Microsoft.Extensions.Logging.Abstractions;

namespace Stormpath.Owin.Middleware
{
Expand All @@ -45,6 +46,8 @@ public static StormpathMiddleware Create(StormpathOwinOptions options)
// Construct the framework User-Agent
IFrameworkUserAgentBuilder userAgentBuilder = new DefaultFrameworkUserAgentBuilder(options.LibraryUserAgent);

options.Logger = options.Logger ?? NullLogger.Instance;

options.Logger.LogInformation("Stormpath middleware starting up", nameof(StormpathMiddleware));

var baseConfiguration = ConfigurationLoader.Initialize().Load(options.Configuration);
Expand Down

0 comments on commit 70d1a78

Please sign in to comment.