Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit cf7fe1f

Browse files
Elc logger (#38)
* Added fluentD logger * Naming fix * Logic fix * Update ELC logger
1 parent ffd4b11 commit cf7fe1f

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ When you build the latest code from source, you'll have access to the latest sna
396396
<dependency>
397397
<groupId>net.lightbody.bmp</groupId>
398398
<artifactId>browsermob-core</artifactId>
399-
<version2.1.38</version>
399+
<version>2.1.38</version>
400400
<scope>test</scope>
401401
</dependency>
402402
```

browsermob-core/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<artifactId>log4j2-ecs-layout</artifactId>
7575
</dependency>
7676

77+
7778
<dependency>
7879
<groupId>com.fasterxml.jackson.core</groupId>
7980
<artifactId>jackson-databind</artifactId>
@@ -167,12 +168,10 @@
167168
<dependency>
168169
<groupId>org.apache.logging.log4j</groupId>
169170
<artifactId>log4j-api</artifactId>
170-
<scope>test</scope>
171171
</dependency>
172172
<dependency>
173173
<groupId>org.apache.logging.log4j</groupId>
174174
<artifactId>log4j-core</artifactId>
175-
<scope>test</scope>
176175
</dependency>
177176
<dependency>
178177
<groupId>org.apache.logging.log4j</groupId>
@@ -268,9 +267,5 @@
268267
<artifactId>httpclient</artifactId>
269268
<scope>test</scope>
270269
</dependency>
271-
<dependency>
272-
<groupId>org.apache.logging.log4j</groupId>
273-
<artifactId>log4j-api</artifactId>
274-
</dependency>
275270
</dependencies>
276271
</project>

browsermob-core/src/main/java/net/lightbody/bmp/filters/HarCaptureFilter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import net.lightbody.bmp.util.BrowserMobHttpUtil;
3535
import org.apache.logging.log4j.LogManager;
3636
import org.apache.logging.log4j.Logger;
37-
import org.apache.logging.log4j.ThreadContext;
3837
import org.apache.logging.log4j.message.StringMapMessage;
3938
import org.littleshoot.proxy.impl.ProxyUtils;
4039

@@ -58,7 +57,8 @@
5857
import static net.lightbody.bmp.filters.StatsDMetricsFilter.prepareMetric;
5958

6059
public class HarCaptureFilter extends HttpsAwareFiltersAdapter {
61-
private static final Logger log = LogManager.getLogger();
60+
private static final Logger log = LogManager.getLogger(HarCaptureFilter.class);
61+
6262
private static final InheritableThreadLocal<HarRequest> isAlreadyLoggedIn = new InheritableThreadLocal<>();
6363

6464
/**
@@ -806,7 +806,6 @@ protected static void logFailedRequestIfRequired(HarRequest request, HarResponse
806806
.with("method", request.getMethod())
807807
.with("response", BeansJsonMapper.getJsonString(response)));
808808
isAlreadyLoggedIn.set(request);
809-
ThreadContext.clearMap();
810809
}
811810
}
812811

0 commit comments

Comments
 (0)