Replace LOGGER by LOG 57/57957/1
authorDavid Suarez <david.suarez.fuentes@ericsson.com>
Mon, 29 May 2017 10:39:43 +0000 (12:39 +0200)
committerDavid Suarez <david.suarez.fuentes@ericsson.com>
Mon, 29 May 2017 10:39:43 +0000 (12:39 +0200)
Replace LOGGER by LOG to follow the
OpenDaylight recommendations [1].

[1]
https://wiki.opendaylight.org/view/BestPractices/Logging_Best_Practices

Change-Id: Ib1cf70417092a120eaf11b523e54b056774fe35c
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
idmanager/idmanager-impl/src/main/java/org/opendaylight/genius/idmanager/IdUtils.java

index 07f3a2311f0e03c987cf4c524d452bcaacd99567..2cb1a88a391a65da614c963c41a4c4beabcbe971 100644 (file)
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
 @Singleton
 public class IdUtils {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(IdUtils.class);
+    private static final Logger LOG = LoggerFactory.getLogger(IdUtils.class);
 
     public static final long DEFAULT_DELAY_TIME = 30;
     private static final long DEFAULT_AVAILABLE_ID_COUNT = 0;
@@ -220,14 +220,14 @@ public class IdUtils {
         Future<RpcResult<Void>> result = lockManager.lock(input);
         try {
             if (result != null && result.get().isSuccessful()) {
-                if (LOGGER.isDebugEnabled()) {
-                    LOGGER.debug("Acquired lock {}", poolName);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Acquired lock {}", poolName);
                 }
             } else {
                 throw new IdManagerException(String.format("Unable to getLock for pool %s", poolName));
             }
         } catch (InterruptedException | ExecutionException e) {
-            LOGGER.error("Unable to getLock for pool {}", poolName, e);
+            LOG.error("Unable to getLock for pool {}", poolName, e);
             throw new RuntimeException(String.format("Unable to getLock for pool %s", poolName), e);
         }
     }
@@ -237,16 +237,16 @@ public class IdUtils {
         Future<RpcResult<Void>> result = lockManager.unlock(input);
         try {
             if (result != null && result.get().isSuccessful()) {
-                if (LOGGER.isDebugEnabled()) {
-                    LOGGER.debug("Unlocked {}", poolName);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Unlocked {}", poolName);
                 }
             } else {
-                if (LOGGER.isDebugEnabled()) {
-                    LOGGER.debug("Unable to unlock pool {}", poolName);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Unable to unlock pool {}", poolName);
                 }
             }
         } catch (InterruptedException | ExecutionException e) {
-            LOGGER.error("Unable to unlock for pool {}", poolName, e);
+            LOG.error("Unable to unlock for pool {}", poolName, e);
             throw new RuntimeException(String.format("Unable to unlock pool %s", poolName), e);
         }
     }