Tabnine Logo
BatfishLogger.debug
Code IndexAdd Tabnine to your IDE (free)

How to use
debug
method
in
org.batfish.common.BatfishLogger

Best Java code snippets using org.batfish.common.BatfishLogger.debug (Showing top 11 results out of 315)

origin: batfish/batfish

public void debugf(String format, Object... args) {
 debug(String.format(format, args));
}
origin: batfish/batfish

  outputClassName, e.getValue(), e.getKey());
S object = deserializeObject(e.getKey(), outputClass);
logger.debug(" ...OK\n");
readCompleted.incrementAndGet();
return new SimpleImmutableEntry<>(e.getValue(), object);
origin: batfish/batfish

_logger.debugf("Writing config to \"%s\"...", outputFileAsString);
CommonUtil.writeFile(outputFile, flatConfigText);
_logger.debug("OK\n");
origin: batfish/batfish

private boolean answerFile(
  Path questionFile, boolean isDifferential, boolean isDelta, FileWriter outWriter) {
 if (!Files.exists(questionFile)) {
  throw new BatfishException("Question file not found: " + questionFile);
 }
 String questionName = DEFAULT_QUESTION_PREFIX + "_" + UUID.randomUUID();
 // upload the question
 boolean resultUpload =
   _workHelper.uploadQuestion(
     _currContainerName,
     isDelta ? _currDeltaTestrig : _currTestrig,
     questionName,
     questionFile.toAbsolutePath().toString());
 if (!resultUpload) {
  return false;
 }
 _logger.debug("Uploaded question. Answering now.\n");
 // answer the question
 WorkItem wItemAs =
   WorkItemBuilder.getWorkItemAnswerQuestion(
     questionName,
     _currContainerName,
     _currTestrig,
     _currDeltaTestrig,
     isDifferential,
     isDelta);
 return execute(wItemAs, outWriter);
}
origin: batfish/batfish

private void serializeAwsConfigs(
  Path testRigPath, Path outputPath, ParseVendorConfigurationAnswerElement pvcae) {
 Map<Path, String> configurationData =
   readConfigurationFiles(testRigPath, BfConsts.RELPATH_AWS_CONFIGS_DIR);
 AwsConfiguration config;
 try (ActiveSpan parseAwsConfigsSpan =
   GlobalTracer.get().buildSpan("Parse AWS configs").startActive()) {
  assert parseAwsConfigsSpan != null; // avoid unused warning
  config = parseAwsConfigurations(configurationData, pvcae);
 }
 _logger.info("\n*** SERIALIZING AWS CONFIGURATION STRUCTURES ***\n");
 _logger.resetTimer();
 outputPath.toFile().mkdirs();
 Path currentOutputPath = outputPath.resolve(BfConsts.RELPATH_AWS_CONFIGS_FILE);
 _logger.debugf("Serializing AWS to \"%s\"...", currentOutputPath);
 serializeObject(config, currentOutputPath);
 _logger.debug("OK\n");
 _logger.printElapsedTime();
}
origin: batfish/batfish

/**
 * Returns a {@link Container Container} that contains information of '{@code networkName}',
 * returns null if network '{@code networkName}' does not exist or the api key that is using has
 * no access to the network
 */
@Nullable
Container getNetwork(String networkName) {
 try {
  WebTarget webTarget =
    getTargetV2(Lists.newArrayList(CoordConstsV2.RSC_NETWORKS, networkName));
  Response response =
    webTarget
      .request(MediaType.APPLICATION_JSON)
      .header(CoordConstsV2.HTTP_HEADER_BATFISH_APIKEY, _settings.getApiKey())
      .header(CoordConstsV2.HTTP_HEADER_BATFISH_VERSION, Version.getVersion())
      .get();
  _logger.debug(response.getStatus() + " " + response.getStatusInfo() + " " + response + "\n");
  if (response.getStatus() != Response.Status.OK.getStatusCode()) {
   _logger.errorf("getNetwork: Did not get OK response. Got: %s\n", response.getStatus());
   _logger.error(response.readEntity(String.class) + "\n");
   return null;
  }
  String containerStr = response.readEntity(String.class);
  return BatfishObjectMapper.mapper().readValue(containerStr, Container.class);
 } catch (Exception e) {
  _logger.errorf("Exception in getNetwork from %s for %s\n", _coordWorkMgrV2, networkName);
  _logger.error(Throwables.getStackTraceAsString(e) + "\n");
  return null;
 }
}
origin: batfish/batfish

    .post(Entity.entity(multiPart, multiPart.getMediaType()));
_logger.debug(response.getStatus() + " " + response.getStatusInfo() + " " + response + "\n");
origin: batfish/batfish

 return false;
_logger.debug("Uploaded question. Answering now.\n");
origin: batfish/batfish

 logger.debug(
   "BF: " + response.getStatus() + " " + response.getStatusInfo() + " " + response + "\n");
 logger.debug(Throwables.getStackTraceAsString(e) + "\n");
 return null;
} catch (Exception e) {
origin: batfish/batfish

private void outputAnswer(Answer answer, boolean writeLog) {
 try {
  String answerString = BatfishObjectMapper.writePrettyString(answer) + '\n';
  _logger.debug(answerString);
  @Nullable String logString = writeLog ? answerString : null;
  writeJsonAnswerWithLog(logString, answerString);
 } catch (Exception e) {
  BatfishException be = new BatfishException("Error in sending answer", e);
  try {
   Answer failureAnswer = Answer.failureAnswer(e.toString(), answer.getQuestion());
   failureAnswer.addAnswerElement(be.getBatfishStackTrace());
   String answerString = BatfishObjectMapper.writePrettyString(failureAnswer) + '\n';
   _logger.error(answerString);
   @Nullable String logString = writeLog ? answerString : null;
   writeJsonAnswerWithLog(logString, answerString);
  } catch (Exception e1) {
   _logger.errorf(
     "Could not serialize failure answer. %s", Throwables.getStackTraceAsString(e1));
  }
  throw be;
 }
}
origin: batfish/batfish

String baseUrl = String.format("%s://%s", protocol, _mainSettings.getServiceBindHost());
URI baseUri = UriBuilder.fromUri(baseUrl).port(_mainSettings.getServicePort()).build();
_mainLogger.debug(String.format("Starting server at %s\n", baseUri));
ResourceConfig rc = new ResourceConfig(Service.class).register(new JettisonFeature());
if (_mainSettings.getTracingEnable()) {
org.batfish.commonBatfishLoggerdebug

Popular methods of BatfishLogger

  • <init>
  • debugf
  • errorf
  • info
  • error
  • infof
  • warnf
  • getLogLevel
  • getLogLevelStr
  • output
  • append
  • getHistory
  • append,
  • getHistory,
  • isActive,
  • setLogLevel,
  • warn,
  • close,
  • getElapsedTime,
  • getPrintStream,
  • getRotatedLogFilename

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JTextField (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now