From dccba9d008ac0ef5ba531d0c9340b2cd10038189 Mon Sep 17 00:00:00 2001 From: David Suarez Date: Mon, 29 May 2017 15:40:59 +0200 Subject: [PATCH] Replace LOGGER by LOG Replace LOGGER by LOG to follow the OpenDaylight recommendations [1]. [1] https://wiki.opendaylight.org/view/BestPractices/Logging_Best_Practices Change-Id: I038b8fc9a16b7443fcdefcad1bc12283151ba503 Signed-off-by: David Suarez --- .../netvirt/bgpmanager/ConfigureBgpCli.java | 2 - .../netvirt/bgpmanager/VtyshCli.java | 9 +- .../bgpmanager/commands/ClearBgpCli.java | 9 +- .../netvirt/bgpmanager/commands/Network.java | 1 + .../thrift/gen/BgpConfigurator.java | 90 +++++++++---------- .../bgpmanager/thrift/gen/BgpUpdater.java | 4 +- .../thrift/server/BgpThriftService.java | 34 +++---- 7 files changed, 71 insertions(+), 78 deletions(-) diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/ConfigureBgpCli.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/ConfigureBgpCli.java index d39cc95ef6..910398df33 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/ConfigureBgpCli.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/ConfigureBgpCli.java @@ -25,11 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.ericsson.params.xml.ns.yang.ebgp.rev1509 @Command(scope = "odl", name = "configure-bgp", description = "") public class ConfigureBgpCli extends OsgiCommandSupport { - private static BgpManager bgpManager; private static BgpConfigurationManager bgpConfigurationManager; - private static final long AS_MIN = 0; private static final long AS_MAX = 4294967295L;//2^32-1 diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/VtyshCli.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/VtyshCli.java index 9b869b02eb..16c62f2a05 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/VtyshCli.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/VtyshCli.java @@ -21,7 +21,6 @@ import org.apache.karaf.shell.console.OsgiCommandSupport; @Command(scope = "odl", name = "show-bgp", description = "") public class VtyshCli extends OsgiCommandSupport { - // public class DisplayBgpConfigCli { @Option(name = "--cmd", description = "command to run", required = true, multiValued = false) String cmd = null; @@ -175,8 +174,8 @@ public class VtyshCli extends OsgiCommandSupport { socket.close(); return; } - if ((ip == (int) gt) || (ip == (int) hashChar)) { - if (ip == (int) gt) { + if (ip == gt || ip == hashChar) { + if (ip == gt) { sb.append(gt); } else { sb.append(hashChar); @@ -207,7 +206,7 @@ public class VtyshCli extends OsgiCommandSupport { socket.close(); return; } - if ((ip == (int) gt) || (ip == (int) hashChar)) { + if (ip == gt || ip == hashChar) { break; } else if (ip == -1) { session.getConsole().println(sb.toString()); @@ -271,7 +270,5 @@ public class VtyshCli extends OsgiCommandSupport { session.getConsole().println(errorMsg); } socket.close(); - } - } diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/ClearBgpCli.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/ClearBgpCli.java index 660030812a..0b0f5a1fc8 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/ClearBgpCli.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/ClearBgpCli.java @@ -106,18 +106,15 @@ public class ClearBgpCli extends OsgiCommandSupport { in = new BufferedReader(new InputStreamReader(session.getKeyboard())); } - private static boolean readPassword(BufferedReader in) - throws IOException { + private static boolean readPassword(BufferedReader in) throws IOException { return readUntilPrompt(in, GT, passwordCheckStr); } - private static boolean readUntilPrompt(BufferedReader in, char promptChar) - throws IOException { + private static boolean readUntilPrompt(BufferedReader in, char promptChar) throws IOException { return readUntilPrompt(in, promptChar, null); } - private static boolean readUntilPrompt( - BufferedReader in, char promptChar, String passwordCheckStr) + private static boolean readUntilPrompt(BufferedReader in, char promptChar, String passwordCheckStr) throws IOException { StringBuilder sb = new StringBuilder(); int ret = 0; diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Network.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Network.java index 2978f49715..95df404139 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Network.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Network.java @@ -30,6 +30,7 @@ public class Network extends OsgiCommandSupport { private static final String AFI = "--afi"; private static final Logger LOG = LoggerFactory.getLogger(Network.class); + @Argument(name = "add|del", description = "The desired operation", required = true, multiValued = false) private final String action = null; diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpConfigurator.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpConfigurator.java index 8e944fffe9..43def6cbf8 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpConfigurator.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpConfigurator.java @@ -2169,7 +2169,7 @@ public class BgpConfigurator { } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + private static final Logger LOG = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap>())); } @@ -2227,7 +2227,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2244,7 +2244,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2285,7 +2285,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2302,7 +2302,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2343,7 +2343,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2360,7 +2360,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2401,7 +2401,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2418,7 +2418,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2459,7 +2459,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2476,7 +2476,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2517,7 +2517,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2534,7 +2534,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2575,7 +2575,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2592,7 +2592,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2633,7 +2633,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2650,7 +2650,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2691,7 +2691,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2708,7 +2708,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2749,7 +2749,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2766,7 +2766,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2807,7 +2807,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2824,7 +2824,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2865,7 +2865,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2882,7 +2882,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2923,7 +2923,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2940,7 +2940,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -2981,7 +2981,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -2998,7 +2998,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3039,7 +3039,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3056,7 +3056,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3097,7 +3097,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3114,7 +3114,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3155,7 +3155,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3172,7 +3172,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3213,7 +3213,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3230,7 +3230,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3270,7 +3270,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3287,7 +3287,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3328,7 +3328,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3345,7 +3345,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3386,7 +3386,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3403,7 +3403,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } @@ -3444,7 +3444,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + LOG.error("Exception writing to internal frame buffer", e); } fb.close(); } @@ -3461,7 +3461,7 @@ public class BgpConfigurator { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + LOG.error("Exception writing to internal frame buffer", ex); } fb.close(); } diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpUpdater.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpUpdater.java index eb8ed42689..be1c8dfe3e 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpUpdater.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/gen/BgpUpdater.java @@ -359,7 +359,7 @@ public class BgpUpdater { } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + private static final Logger LOG = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap>())); } @@ -455,7 +455,7 @@ public class BgpUpdater { } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + private static final Logger LOG = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap>())); } diff --git a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java index 9e74d39a92..24daa25e0e 100644 --- a/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java +++ b/vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/thrift/server/BgpThriftService.java @@ -42,7 +42,7 @@ public class BgpThriftService { // to store copy fo FIB-VRF tables on QBGP restart. public List staleVrfTables; - private static final Logger LOGGER = LoggerFactory.getLogger(BgpThriftService.class); + private static final Logger LOG = LoggerFactory.getLogger(BgpThriftService.class); public BgpThriftService(int ourPort, IBgpManager bm, FibDSWriter fibDSWriter) { this.ourPort = ourPort; @@ -84,18 +84,18 @@ public class BgpThriftService { server.setServerEventHandler(new TServerEventHandler() { @Override public void preServe() { - LOGGER.info("Bgp thrift server pre serve event"); + LOG.info("Bgp thrift server pre serve event"); } @Override public ServerContext createContext(TProtocol input, TProtocol output) { - LOGGER.info("Bgp thrift server create context event"); + LOG.info("Bgp thrift server create context event"); synchronized (this) { if (oldThriftClientContext != null) { - LOGGER.info("Bgp thrift server closing old context"); + LOG.info("Bgp thrift server closing old context"); oldThriftClientContext.getIn().getTransport().close(); } else { - LOGGER.info("Bgp thrift server old context is null nothing to close"); + LOG.info("Bgp thrift server old context is null nothing to close"); } oldThriftClientContext = new ThriftClientContext(input); return oldThriftClientContext; @@ -104,24 +104,24 @@ public class BgpThriftService { @Override public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output) { - LOGGER.info("Bgp thrift server delete context event"); + LOG.info("Bgp thrift server delete context event"); if (oldThriftClientContext == serverContext) { - LOGGER.info("Bgp thrift server cleanup old context"); + LOG.info("Bgp thrift server cleanup old context"); oldThriftClientContext = null; } else { - LOGGER.info("Bgp thrift server cleanup context"); + LOG.info("Bgp thrift server cleanup context"); } } @Override public void processContext(ServerContext serverContext, TTransport inputTransport, TTransport outputTransport) { - LOGGER.trace("Bgp thrift server process context event"); + LOG.trace("Bgp thrift server process context event"); } }); server.serve(); } catch (TTransportException e) { - LOGGER.error("Exception in BGP Updater server" + e); + LOG.error("Exception in BGP Updater server" + e); } } @@ -139,7 +139,7 @@ public class BgpThriftService { String routermac, af_afi afi) { try { - LOGGER.debug("Update on push route : rd {} prefix {} plen {}", rd, prefix, plen); + LOG.debug("Update on push route : rd {} prefix {} plen {}", rd, prefix, plen); // l2label is ignored even in case of RT5. only l3label considered BgpConfigurationManager.onUpdatePushRoute( @@ -157,7 +157,7 @@ public class BgpThriftService { afi); } catch (Throwable e) { - LOGGER.error("failed to handle update route ", e); + LOG.error("failed to handle update route ", e); } } @@ -173,7 +173,7 @@ public class BgpThriftService { int l2label, af_afi afi) { try { - LOGGER.debug("Route del ** {} ** {}/{} ", rd, prefix, plen); + LOG.debug("Route del ** {} ** {}/{} ", rd, prefix, plen); BgpConfigurationManager.onUpdateWithdrawRoute( protocolType, rd, @@ -182,16 +182,16 @@ public class BgpThriftService { nexthop, macaddress); } catch (InterruptedException e1) { - LOGGER.error("Interrupted exception for withdraw route", e1); + LOG.error("Interrupted exception for withdraw route", e1); } catch (ExecutionException e2) { - LOGGER.error("Execution exception for withdraw route", e2); + LOG.error("Execution exception for withdraw route", e2); } catch (TimeoutException e3) { - LOGGER.error("Timeout exception for withdraw route", e3); + LOG.error("Timeout exception for withdraw route", e3); } } public void onStartConfigResyncNotification() { - LOGGER.info("BGP (re)started"); + LOG.info("BGP (re)started"); bgpManager.setQbgprestartTS(System.currentTimeMillis()); bgpManager.bgpRestarted(); } -- 2.36.6