Skip to content

Commit

Permalink
Fix no response logging on async Feign (#1450)
Browse files Browse the repository at this point in the history
* Fix no response logging on async Feign.

Copy log level onto asyncBuilder as well as setting it on the builder, so responses get logged in the asynchronous case.

* Forgot a semicolon

* Run license:format; make logLevel not final.

Co-authored-by: Andrew Winterman <andrew.winterman@altruist.com>
  • Loading branch information
AWinterman and Andrew Winterman committed Jul 1, 2021
1 parent 5087bd8 commit 83bb55c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/feign/AsyncFeign.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2012-2020 The Feign Authors
* Copyright 2012-2021 The Feign Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -63,7 +63,7 @@ public static class AsyncBuilder<C> {
private Supplier<C> defaultContextSupplier = () -> null;
private AsyncClient<C> client;

private final Logger.Level logLevel = Logger.Level.NONE;
private Logger.Level logLevel = Logger.Level.NONE;
private final Logger logger = new NoOpLogger();

private Decoder decoder = new Decoder.Default();
Expand Down Expand Up @@ -159,6 +159,7 @@ public AsyncFeign<C> build() {
*/
public AsyncBuilder<C> logLevel(Logger.Level logLevel) {
builder.logLevel(logLevel);
this.logLevel = logLevel;
return this;
}

Expand Down

0 comments on commit 83bb55c

Please sign in to comment.