ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1516406 - /ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
Date Thu, 22 Aug 2013 10:10:12 GMT
Author: bramk
Date: Thu Aug 22 10:10:12 2013
New Revision: 1516406

URL: http://svn.apache.org/r1516406
Log:
ACE-347 Alligned levels for internal logger with LogService

Modified:
    ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java

Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java?rev=1516406&r1=1516405&r2=1516406&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java (original)
+++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java Thu Aug 22
10:10:12 2013
@@ -57,7 +57,7 @@ public class Activator extends Dependenc
 
     // internal delegates
     private final InternalEvents m_internalEvents = new InternalEvents();
-    private final InternalLogger m_internalLogger = new InternalLogger(1);
+    private final InternalLogger m_internalLogger = new InternalLogger(LogService.LOG_DEBUG);
 
     // managed state
     private AgentContextImpl m_agentContext;
@@ -305,19 +305,19 @@ public class Activator extends Dependenc
         }
 
         public void logDebug(String component, String message, Throwable exception, Object...
args) {
-            if (m_level > 1)
+            if (m_level < LogService.LOG_DEBUG)
                 return;
             log("DEBUG", component, message, exception, args);
         }
 
         public void logInfo(String component, String message, Throwable exception, Object...
args) {
-            if (m_level > 2)
+            if (m_level < LogService.LOG_INFO)
                 return;
             log("INFO", component, message, exception, args);
         }
 
         public void logWarning(String component, String message, Throwable exception, Object...
args) {
-            if (m_level > 3)
+            if (m_level < LogService.LOG_WARNING)
                 return;
             log("WARNING", component, message, exception, args);
         }
@@ -348,14 +348,14 @@ public class Activator extends Dependenc
         @Override
         public void log(int level, String message, Throwable exception) {
             switch (level) {
-                case 1:
-                    m_logger.logDebug(m_identifier, message, exception);
+                case LogService.LOG_WARNING:
+                    m_logger.logWarning(m_identifier, message, exception);
                     return;
-                case 2:
+                case LogService.LOG_INFO:
                     m_logger.logInfo(m_identifier, message, exception);
                     return;
-                case 3:
-                    m_logger.logWarning(m_identifier, message, exception);
+                case LogService.LOG_DEBUG:
+                    m_logger.logDebug(m_identifier, message, exception);
                     return;
                 default:
                     m_logger.logError(m_identifier, message, exception);



Mime
View raw message