Improving logging and request id (#189)

* hacking around to work out why logging and request id isnt working

* pass request id into logger so it can be structured, removed a bunch of debug logging we dont need because diagnostic trace gets it

* changed config dependency

* always have tracing available

* made it so we dont need to pass config into services.AddOcelot anymore with .net core 2.0

* add test

* lots of changes relating to logging and request ids, also updated documentation

* fixed failing test i missed
This commit is contained in:
Tom Pallister
2018-01-06 16:39:05 +00:00
committed by GitHub
parent 464f266148
commit 6a20baeb97
43 changed files with 562 additions and 197 deletions

View File

@ -51,14 +51,15 @@ namespace Ocelot.UnitTests.Configuration
}
[Fact]
public void should_use_global_cofiguration_over_re_route_specific()
public void should_use_re_route_over_global_specific()
{
var reRoute = new FileReRoute
{
RequestIdKey = "cheese"
}; var globalConfig = new FileGlobalConfiguration
};
var globalConfig = new FileGlobalConfiguration
{
RequestIdKey = "cheese"
RequestIdKey = "test"
};
this.Given(x => x.GivenTheFollowingReRoute(reRoute))