GH-456 Fix Azure logging

Added static delegate context which holds target context and is also refreshed with new context on each request

Resolves #456
This commit is contained in:
Oleg Zhurakousky
2020-04-02 16:36:54 +02:00
parent d3345576bd
commit aa721a7b43
6 changed files with 59 additions and 75 deletions

View File

@@ -232,13 +232,20 @@ public class AzureSpringBootRequestHandlerTests {
protected static class MultiConfig {
@Bean
public Function<Foo, Bar> uppercase() {
return foo -> new Bar(foo.getValue().toUpperCase());
public Function<Foo, Bar> uppercase(ExecutionContext context) {
return foo -> {
context.getLogger().info("Executing uppercase function");
return new Bar(foo.getValue().toUpperCase());
};
}
@Bean
public Function<Bar, Foo> lowercase() {
return bar -> new Foo(bar.getValue().toLowerCase());
public Function<Bar, Foo> lowercase(ExecutionContext context) {
return bar -> {
context.getLogger().info("Executing lowercase function");
return new Foo(bar.getValue().toLowerCase());
};
}
}