Skip to content

Commit

Permalink
adjust log filter for exclude security token errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jan 17, 2017
1 parent c35cd49 commit 4c56a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void Configure(
Func<LogEvent, bool> serilogFilter = (e) =>
{
var context = e.Properties["SourceContext"].ToString();
if(context == typeof(JwtBearerMiddleware).FullName && e.Level == LogEventLevel.Error)
if(e.Exception != null && e.Exception.GetType() == typeof(SecurityTokenValidationException) || e.Exception.Message == "Bad security stamp.")
{
return false;
}
Expand Down

0 comments on commit 4c56a37

Please sign in to comment.