Thread safety in logger #26

Merged
merged 1 commit into from Jun 14, 2012

Conversation

Projects
None yet
2 participants
Contributor

drewr commented Jun 5, 2012

We ran into an issue where a parameter from the request wasn't available in the response thread of the channel. Store those in final instance params instead of trying to grab them during log construction.

@drewr drewr [ENG-2658] Set params from the request at channel creation.
The request may not be available to the response thread later.
02d48e7

@imotov imotov commented on the diff Jun 5, 2012

...tp/filter/logging/LoggingFilterHttpServerAdapter.java
@@ -128,6 +143,15 @@ public LoggingHttpChannel(HttpRequest request, HttpChannel channel, String forma
} else {
content = null;
}
+
@imotov

imotov Jun 5, 2012

Contributor

This portion is not really needed and shouldn't be executed in case of non-json logging. Maybe we should split it into two different Loggers after all.

Contributor

imotov commented Jun 14, 2012

+1 - let's get this in and then we will refactor it

drewr merged commit 02d48e7 into master Jun 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment