Log downstream templates in DownstreamRouteFinderMiddleware (#302)

Concatenate all downstream templates separated by , (colon) in order to write
them to the log.
This commit is contained in:
Felix Boers 2018-04-05 20:07:23 +02:00 committed by Tom Pallister
parent ec545fadae
commit ff3e7c6665

View File

@ -1,4 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Linq;
using Ocelot.Configuration; using Ocelot.Configuration;
using Ocelot.Configuration.Provider; using Ocelot.Configuration.Provider;
using Ocelot.DownstreamRouteFinder.Finder; using Ocelot.DownstreamRouteFinder.Finder;
@ -59,8 +60,8 @@ namespace Ocelot.DownstreamRouteFinder.Middleware
return; return;
} }
// todo - put this back in var downstreamPathTemplates = string.Join(", ", downstreamRoute.Data.ReRoute.DownstreamReRoute.Select(r => r.DownstreamPathTemplate.Value));
//// _logger.LogDebug("downstream template is {downstreamRoute.Data.ReRoute.DownstreamPath}", downstreamRoute.Data.ReRoute.DownstreamReRoute.DownstreamPathTemplate); _logger.LogDebug($"downstream templates are {downstreamPathTemplates}");
context.TemplatePlaceholderNameAndValues = downstreamRoute.Data.TemplatePlaceholderNameAndValues; context.TemplatePlaceholderNameAndValues = downstreamRoute.Data.TemplatePlaceholderNameAndValues;