@Override public int update(String sql, Object[] data) throws SvcLogicException { logger.debug("Query ({}) with data ({})", sql, data); return jdbcTemplate.update(sql, data); }
@Override public void start(BundleContext bundleContext) throws Exception { logger.debug("Starting Metric service " ); MetricService impl = new MetricServiceImpl(); String regName = MetricService.class.getName(); logger.debug("Registering Metric service " + regName); registration = bundleContext.registerService(regName, impl, null); logger.debug("Registered Metric service " + regName); }
public static void printMap(Map<String, String> map) { if (map != null) { Map<String, String> sortedMap = new TreeMap(map); StringBuilder buffer = new StringBuilder(); sortedMap.entrySet().forEach(message -> { buffer.append("\n" + message.toString()); }); logger.debug("Map: ({})", buffer); } }
public static void printProperty(Properties property) { if (property != null) { Map<String, String> sortedMap = new TreeMap(property); StringBuilder buffer = new StringBuilder(); sortedMap.entrySet().forEach(message -> { buffer.append("\n" + message.toString()); }); logger.debug("Property : ({})", buffer); } }
/** * Genral debug log when debug logging level is enabled. * @param message of the log message format * @param args of the objects listed in the message format */ private void logDebug(String message, Object... args) { if (logger.isDebugEnabled()) { logger.debug(String.format(message, args)); } }
@Override public void publish(MetricRegistry metricRegistry, Metric[] metrics) { for(Metric metric:metrics){ logger.debug("LOG PUBLISHER:"+metric.name()+":"+metric.toString()); } }
@Override public int update(String sql, Map<String, Object> parameters) throws SvcLogicException { logger.debug("update ({}) with parameters ({})", sql, parameters); return namedParameterJdbcTemplate.update(sql, parameters); } }
@Override public List<Map<String, Object>> query(String sql, Object[] data) throws SvcLogicException { logger.debug("Query ({}) with data ({})", sql, data); return jdbcTemplate.queryForList(sql, data); }
@Override public List<Map<String, Object>> query(String sql, Map<String, Object> parameters) throws SvcLogicException { logger.debug("Query ({}) with parameters ({})", sql, parameters); return namedParameterJdbcTemplate.queryForList(sql, parameters); }
/** * Genral debug log when debug logging level is enabled. * @param message of the log message format * @param args of the objects listed in the message format */ void logDebug(String message, Object... args) { if (logger.isDebugEnabled()) { logger.debug(String.format(message, args)); } } }
/** * Genral debug log when debug logging level is enabled. * @param message of the log message format * @param args of the objects listed in the message format */ private void logDebug(String message, Object... args) { if (logger.isDebugEnabled()) { logger.debug(String.format(message, args)); } }
@Override public void handleUpgradeStub(Map<String, String> params, SvcLogicContext ctx) throws APPCException { logger.debug("Entering in handleUpgradeStub : "+ params.toString()); String failureInd = params.get(FAILURE_INDICATOR_FIELD_NAME); if (null != failureInd && Boolean.valueOf(failureInd)){ throw new APPCException("Simulating exception..."); } logger.info("Simulating was successful"); } }
@Override public void closeClients() { LOG.debug("Closing Consumer and Producer DMaaP clients"); if (reader != null) { reader.close(); } if (producer != null) { producer.close(); } }
private void tryRemoveInterator(Iterator<Vnfc> vnfcIterator, Vnfc vnfc) { if (vnfc.getVserverList().isEmpty()) { if (logger.isDebugEnabled()) { logger.debug("No vservers present for Vnfc type: " + vnfc.getVnfcType() + ". Hence, removing it from the flow model."); } vnfcIterator.remove(); } } }
private void logContext(SvcLogicContext context) { for (String key : context.getAttributeKeySet()) { logger.debug(key + " = " + context.getAttribute(key) + "\n"); } }
private void logContext(SvcLogicContext context) { for(String key:context.getAttributeKeySet()){ logger.debug(key + " = " + context.getAttribute(key) + "\n" ); } }
@Override public void postStatus(String partition, String event) { LOG.debug(String.format("Posting Message [%s]", event)); if (producer == null) { LOG.info("Getting Producer..."); producer = getProducer(); } producer.post(partition, event); }
public void updateVnfStatusWithOAMAddress(Map<String, String> params, SvcLogicContext ctx) throws AaiServiceInternalException, SvcLogicException { log.info("Received updateVnfStatusWithOAMAddress call with params : " + params); String ipAddress = ctx.getAttribute("vnf-host-ip-address"); log.debug("Vnf-host-ip-address" + ipAddress); Map<String, String> vnfParams = new HashMap<>(); vnfParams.put("ipv4-oam-address", ipAddress); String resourceKey = STR_VNF_ID + ctx.getAttribute(ATTR_VNF_ID) + "'"; updateResource(PARAM_GENERIC_VNF, resourceKey, vnfParams); }
public void disconnect() { try { if (logger.isDebugEnabled()) { logger.debug("SSH: disconnecting from [" + toString() + "]"); } clientSession.close(false); } finally { if (sshClient != null) { sshClient.stop(); } } }
private void updateAAIForTerminate(CommandRequest commandRequest) throws AAIServiceException { final int statusCode = commandRequest.getCommandExecutorInput().getRuntimeContext().getResponseContext().getStatus().getCode(); if (logger.isDebugEnabled()) { logger.debug("Workflow Execution Status = "+ statusCode); } if (statusCode == 100 || statusCode == 400) { SvcLogicContext ctx = new SvcLogicContext(); ctx = getVnfdata(commandRequest.getCommandExecutorInput().getRuntimeContext().getVnfContext().getId(), "vnf", ctx); deleteGenericVnfData(commandRequest.getCommandExecutorInput().getRuntimeContext().getVnfContext().getId(), ctx.getAttribute("vnf.resource-version")); } }