more logging, more readme, more refactoring

This commit is contained in:
TomPallister
2016-11-05 11:36:58 +00:00
parent 8582ba45a9
commit af506b079a
37 changed files with 415 additions and 201 deletions

View File

@ -27,7 +27,6 @@ namespace Ocelot.ManualTest
public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
Action<ConfigurationBuilderCachePart> settings = (x) =>
@ -44,13 +43,10 @@ namespace Ocelot.ManualTest
services.AddOcelot();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseOcelot();
}
}

View File

@ -1,6 +1,6 @@
{
"Logging": {
"IncludeScopes": false,
"IncludeScopes": true,
"LogLevel": {
"Default": "Debug",
"System": "Information",

View File

@ -41,7 +41,8 @@
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts",
"UpstreamTemplate": "/posts",
"UpstreamHttpMethod": "Get",
"FileCacheOptions": { "TtlSeconds": 15 }
"FileCacheOptions": { "TtlSeconds": 15 },
"RequestIdKey": "OcRequestId"
},
{
"DownstreamTemplate": "http://jsonplaceholder.typicode.com/posts/{postId}",