mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 18:00:48 +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:
		
				
					committed by
					
						
						Tom Pallister
					
				
			
			
				
	
			
			
			
						parent
						
							ec545fadae
						
					
				
				
					commit
					ff3e7c6665
				
			@@ -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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user