mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
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:
parent
ec545fadae
commit
ff3e7c6665
@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Ocelot.Configuration;
|
||||
using Ocelot.Configuration.Provider;
|
||||
using Ocelot.DownstreamRouteFinder.Finder;
|
||||
@ -59,8 +60,8 @@ namespace Ocelot.DownstreamRouteFinder.Middleware
|
||||
return;
|
||||
}
|
||||
|
||||
// todo - put this back in
|
||||
//// _logger.LogDebug("downstream template is {downstreamRoute.Data.ReRoute.DownstreamPath}", downstreamRoute.Data.ReRoute.DownstreamReRoute.DownstreamPathTemplate);
|
||||
var downstreamPathTemplates = string.Join(", ", downstreamRoute.Data.ReRoute.DownstreamReRoute.Select(r => r.DownstreamPathTemplate.Value));
|
||||
_logger.LogDebug($"downstream templates are {downstreamPathTemplates}");
|
||||
|
||||
context.TemplatePlaceholderNameAndValues = downstreamRoute.Data.TemplatePlaceholderNameAndValues;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user