From 4c56a370a05fe9f0268cb31bf20430a9624b6f7c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 16 Jan 2017 23:55:48 -0500 Subject: [PATCH] adjust log filter for exclude security token errors --- src/Api/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs index f5a598da4..602da8cd3 100644 --- a/src/Api/Startup.cs +++ b/src/Api/Startup.cs @@ -206,7 +206,7 @@ namespace Bit.Api Func 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; }