aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject incubator-aurora git commit: Changing log level for the RequestLogger.
Date Mon, 15 Dec 2014 20:51:05 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master cbe9c0546 -> 52efc933f


Changing log level for the RequestLogger.

Bugs closed: AURORA-934

Reviewed at https://reviews.apache.org/r/29005/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/52efc933
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/52efc933
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/52efc933

Branch: refs/heads/master
Commit: 52efc933f995ce99275769ede8d05f2328c96b6a
Parents: cbe9c05
Author: Maxim Khutornenko <maxim@apache.org>
Authored: Mon Dec 15 12:50:50 2014 -0800
Committer: -l <maxim@apache.org>
Committed: Mon Dec 15 12:50:50 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/aurora/scheduler/http/RequestLogger.java | 2 +-
 .../org/apache/aurora/scheduler/http/RequestLoggerTest.java  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/52efc933/src/main/java/org/apache/aurora/scheduler/http/RequestLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/RequestLogger.java b/src/main/java/org/apache/aurora/scheduler/http/RequestLogger.java
index 916939d..8a0429c 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/RequestLogger.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/RequestLogger.java
@@ -121,7 +121,7 @@ public class RequestLogger extends AbstractLifeCycle implements RequestLog
{
   @Override
   public void log(Request request, Response response) {
     int statusCategory = response.getStatus() / 100;
-    Level level = statusCategory == 2 || statusCategory == 3 ? Level.FINE : Level.INFO;
+    Level level = statusCategory == 2 || statusCategory == 3 ? Level.INFO : Level.WARNING;
     if (!sink.isLoggable(level)) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/52efc933/src/test/java/org/apache/aurora/scheduler/http/RequestLoggerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/http/RequestLoggerTest.java b/src/test/java/org/apache/aurora/scheduler/http/RequestLoggerTest.java
index 6beaa6b..298a34e 100644
--- a/src/test/java/org/apache/aurora/scheduler/http/RequestLoggerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/http/RequestLoggerTest.java
@@ -65,8 +65,8 @@ public class RequestLoggerTest extends EasyMockTest {
     expect(request.getHeader(HttpHeaders.USER_AGENT)).andReturn("junit");
     expect(request.getTimeStamp()).andReturn(clock.nowMillis()).atLeastOnce();
 
-    expect(sink.isLoggable(Level.FINE)).andReturn(true);
-    sink.log(Level.FINE, "snoopy easymock-test [22/Dec/2009:00:00:00 +0000]"
+    expect(sink.isLoggable(Level.INFO)).andReturn(true);
+    sink.log(Level.INFO, "snoopy easymock-test [22/Dec/2009:00:00:00 +0000]"
         + " \"GET / http\" 200 256 \"-\" \"junit\" 110");
 
     control.replay();
@@ -91,8 +91,8 @@ public class RequestLoggerTest extends EasyMockTest {
     expect(request.getHeader(HttpHeaders.USER_AGENT)).andReturn("junit");
     expect(request.getTimeStamp()).andReturn(clock.nowMillis()).atLeastOnce();
 
-    expect(sink.isLoggable(Level.INFO)).andReturn(true);
-    sink.log(Level.INFO, "woodstock easymock-test [22/Dec/2009:00:00:00 +0000]"
+    expect(sink.isLoggable(Level.WARNING)).andReturn(true);
+    sink.log(Level.WARNING, "woodstock easymock-test [22/Dec/2009:00:00:00 +0000]"
         + " \"POST /data http\" 500 128 \"-\" \"junit\" 500");
 
     control.replay();


Mime
View raw message