Replace LOGGER by LOG 54/57954/2
authorDavid Suarez <david.suarez.fuentes@ericsson.com>
Mon, 29 May 2017 10:03:08 +0000 (12:03 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 29 May 2017 11:22:24 +0000 (11:22 +0000)
Replace LOGGER by LOG to follow the
OpenDaylight recommendations [1].

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

Change-Id: I024bcd5f23a5bdcc177440b175578694c6c471a4
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/gofactory/AbsModuleGeneratedObjectFactory.java
opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/config/yang/messagebus/app/impl/MessageBusAppImplModule.java
opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/Providers.java

index b562a43..cfc2ea5 100644 (file)
@@ -362,7 +362,7 @@ public class AbsModuleGeneratedObjectFactory {
     }
 
     private static String getLoggerDefinition(FullyQualifiedName fqn) {
-        return format("private static final %s LOGGER = %s.getLogger(%s.class);",
+        return format("private static final %s LOG = %s.getLogger(%s.class);",
                 Logger.class.getCanonicalName(), LoggerFactory.class.getCanonicalName(), fqn);
     }
 
@@ -396,6 +396,6 @@ public class AbsModuleGeneratedObjectFactory {
     }
 
     public String getGetLogger() {
-        return new MethodDefinition(Logger.class.getCanonicalName(), "getLogger", Collections.<Field>emptyList(), "return LOGGER;").toString();
+        return new MethodDefinition(Logger.class.getCanonicalName(), "getLogger", Collections.<Field>emptyList(), "return LOG;").toString();
     }
 }
index a4e5514..9f9d737 100644 (file)
@@ -19,7 +19,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class MessageBusAppImplModule extends org.opendaylight.controller.config.yang.messagebus.app.impl.AbstractMessageBusAppImplModule {
-    private static final Logger LOGGER = LoggerFactory.getLogger(MessageBusAppImplModule.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MessageBusAppImplModule.class);
 
     private BundleContext bundleContext;
 
@@ -50,7 +50,7 @@ public class MessageBusAppImplModule extends org.opendaylight.controller.config.
         final DataBroker dataBroker = bindingCtx.getSALService(DataBroker.class);
         final RpcProviderRegistry rpcRegistry = bindingCtx.getSALService(RpcProviderRegistry.class);
         final EventSourceTopology eventSourceTopology = new EventSourceTopology(dataBroker, rpcRegistry);
-        LOGGER.info("Messagebus initialized");
+        LOG.info("Messagebus initialized");
         return eventSourceTopology;
     }
 
index 84c5455..ca69936 100644 (file)
@@ -16,14 +16,14 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class Providers {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Providers.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Providers.class);
 
     public static class BindingAware implements BindingAwareProvider, AutoCloseable {
 
 
         @Override
         public void onSessionInitiated(final BindingAwareBroker.ProviderContext session) {
-            LOGGER.info("BindingAwareBroker.ProviderContext initialized");
+            LOG.info("BindingAwareBroker.ProviderContext initialized");
         }
 
         @Override
@@ -34,7 +34,7 @@ public class Providers {
 
         @Override
         public void onSessionInitiated(final Broker.ProviderSession session) {
-            LOGGER.info("Broker.ProviderSession initialized");
+            LOG.info("Broker.ProviderSession initialized");
         }
 
         @Override

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.