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

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

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

origin: batfish/batfish

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

public void handleSigInt() {
 _logger.info("Got SIGINT\n");
 WorkItem wItem = _polledWorkItem;
 if (wItem != null) {
  _logger.outputf("Killing %s\n", wItem.getId());
  boolean result = _workHelper.killWork(_polledWorkItem.getId());
  _logger.outputf("Result of killing %s: %s\n", wItem.getId(), result);
 } else {
  _logger.output("No work being polled\n");
 }
}
origin: batfish/batfish

private boolean dir(List<String> options, List<String> parameters) {
 if (!isValidArgument(options, parameters, 0, 0, 1, Command.DIR)) {
  return false;
 }
 String dirname = (parameters.size() == 1) ? parameters.get(0) : ".";
 File currDirectory = new File(dirname);
 for (File file : currDirectory.listFiles()) {
  _logger.output(file.getName() + "\n");
 }
 return true;
}
origin: batfish/batfish

private boolean getQuestionTemplates(List<String> options, List<String> parameters) {
 if (!isValidArgument(options, parameters, 0, 0, 0, Command.GET_QUESTION_TEMPLATES)) {
  return false;
 }
 JSONObject templates = _workHelper.getQuestionTemplates();
 if (templates == null) {
  return false;
 }
 _logger.outputf("Found %d templates\n", templates.length());
 try {
  _logger.output(templates.toString(1));
 } catch (JSONException e) {
  throw new BatfishException("Failed to print templates", e);
 }
 return true;
}
origin: batfish/batfish

private void logOutput(FileWriter outWriter, String message) {
 if (outWriter == null) {
  _logger.output(message);
 } else {
  try {
   outWriter.write(message);
  } catch (IOException e) {
   throw new BatfishException("Failed to log output to outWriter", e);
  }
 }
}
origin: batfish/batfish

_logger.output("---------------- Service Log --------------\n");
String logFileName = wItem.getId() + BfConsts.SUFFIX_LOG_FILE;
String downloadedFileStr =
origin: batfish/batfish

private boolean prompt(List<String> options, List<String> parameters) throws IOException {
 if (!isValidArgument(options, parameters, 0, 0, 0, Command.PROMPT)) {
  return false;
 }
 if (_settings.getRunMode() == RunMode.interactive) {
  _logger.output("\n\n[Press enter to proceed]\n\n");
  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
  in.readLine();
 }
 return true;
}
origin: batfish/batfish

private boolean initNetwork(List<String> options, List<String> parameters) {
 if (options.contains("-setname")) {
  if (!isValidArgument(options, parameters, 1, 1, 1, Command.INIT_NETWORK)) {
   return false;
  }
  _currContainerName = _workHelper.initNetwork(parameters.get(0), null);
 } else {
  if (!isValidArgument(options, parameters, 0, 0, 1, Command.INIT_NETWORK)) {
   return false;
  }
  String containerPrefix = parameters.isEmpty() ? DEFAULT_NETWORK_PREFIX : parameters.get(0);
  _currContainerName = _workHelper.initNetwork(null, containerPrefix);
 }
 if (_currContainerName == null) {
  _logger.errorf("Could not init network\n");
  return false;
 }
 _logger.output("Active network is set");
 _logger.infof(" to  %s\n", _currContainerName);
 _logger.output("\n");
 return true;
}
origin: batfish/batfish

/**
 * Get information of the container (first element in {@code parameters}).
 *
 * <p>Returns {@code true} if successfully get container information, {@code false} otherwise
 */
private boolean getNetwork(List<String> options, List<String> parameters) {
 if (!isValidArgument(options, parameters, 0, 1, 1, Command.GET_NETWORK)) {
  return false;
 }
 String containerName = parameters.get(0);
 Container container = _workHelper.getNetwork(containerName);
 if (container != null) {
  _logger.output(container.getTestrigs() + "\n");
  return true;
 }
 return false;
}
origin: batfish/batfish

 reader.lines().forEach(line -> _mainLogger.output(line + "\n"));
} catch (IOException e) {
 _mainLogger.errorf(
origin: batfish/batfish

  return false;
 _logger.output("Init'ed and set active network");
 _logger.infof(" to %s\n", _currContainerName);
 _logger.output("\n");
 return false;
_logger.output("Uploaded snapshot.\n");
 _logger.output("Parsing now.\n");
 WorkItem wItemParse = WorkItemBuilder.getWorkItemParse(_currContainerName, testrigName);
origin: batfish/batfish

_logger.output(DIFF_NOT_READY_MSG);
return false;
origin: batfish/batfish

JsonSchemaGenerator schemaGenNew = new JsonSchemaGenerator(BatfishObjectMapper.mapper());
JsonNode schemaNew = schemaGenNew.generateJsonSchema(Configuration.class);
_logger.output(BatfishObjectMapper.writePrettyString(schemaNew));
origin: batfish/batfish

_logger.output(DIFF_NOT_READY_MSG);
return false;
origin: batfish/batfish

 _logger.output(answerStringToPrint);
} catch (BatfishException e) {
org.batfish.commonBatfishLoggeroutput

Popular methods of BatfishLogger

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
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