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>
(cherry picked from commit
202de5f104dc8149accab4ebf04c3ec8857edff2)
}
private static String getLoggerDefinition(FullyQualifiedName fqn) {
}
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);
}
Logger.class.getCanonicalName(), LoggerFactory.class.getCanonicalName(), fqn);
}
}
public String getGetLogger() {
}
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();
import org.slf4j.LoggerFactory;
public class MessageBusAppImplModule extends org.opendaylight.controller.config.yang.messagebus.app.impl.AbstractMessageBusAppImplModule {
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;
private BundleContext bundleContext;
final DataBroker dataBroker = bindingCtx.getSALService(DataBroker.class);
final RpcProviderRegistry rpcRegistry = bindingCtx.getSALService(RpcProviderRegistry.class);
final EventSourceTopology eventSourceTopology = new EventSourceTopology(dataBroker, rpcRegistry);
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;
}
return eventSourceTopology;
}
import org.slf4j.LoggerFactory;
public class Providers {
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) {
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
public void onSessionInitiated(final Broker.ProviderSession session) {
@Override
public void onSessionInitiated(final Broker.ProviderSession session) {
- LOGGER.info("Broker.ProviderSession initialized");
+ LOG.info("Broker.ProviderSession initialized");