congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Log$LogLevel.getStringValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getStringValue
method
in
com.android.ddmlib.Log$LogLevel

Best Java code snippets using com.android.ddmlib.Log$LogLevel.getStringValue (Showing top 5 results out of 315)

origin: square/spoon

private void saveRawLogFile(File rawFile, DeviceTestResult deviceTestResult) {
 rawFile.getParentFile().mkdirs();
 try {
  if (!rawFile.createNewFile() || !rawFile.canWrite()) {
   return;
  }
 } catch (IOException e) {
  throw new RuntimeException("Unable to create raw log file " + rawFile.getAbsolutePath(), e);
 }
 try (Writer writer = new BufferedWriter(
   new OutputStreamWriter(new FileOutputStream(rawFile), UTF_8))) {
  for (LogCatMessage logCatMessage : deviceTestResult.getLog()) {
   writer.write(logCatMessage.getTimestamp().toString());
   writer.write(" ");
   writer.write(logCatMessage.getLogLevel().getStringValue());
   writer.write(" ");
   writer.write(logCatMessage.getTag());
   writer.write(" ");
   writer.write(logCatMessage.getMessage());
   writer.write("\n");
  }
 } catch (IOException e) {
  throw new RuntimeException("Unable to write raw log file to " + rawFile.getAbsolutePath(), e);
 }
}
origin: com.jdfind.spoon/spoon-runner

private void saveRawLogFile(File rawFile, DeviceTestResult deviceTestResult) {
 rawFile.getParentFile().mkdirs();
 try {
  if (!rawFile.createNewFile() || !rawFile.canWrite()) {
   return;
  }
 } catch (IOException e) {
  throw new RuntimeException("Unable to create raw log file " + rawFile.getAbsolutePath(), e);
 }
 try (Writer writer = new BufferedWriter(
   new OutputStreamWriter(new FileOutputStream(rawFile), UTF_8))) {
  for (LogCatMessage logCatMessage : deviceTestResult.getLog()) {
   writer.write(logCatMessage.getTimestamp().toString());
   writer.write(" ");
   writer.write(logCatMessage.getLogLevel().getStringValue());
   writer.write(" ");
   writer.write(logCatMessage.getTag());
   writer.write(" ");
   writer.write(logCatMessage.getMessage());
   writer.write("\n");
  }
 } catch (IOException e) {
  throw new RuntimeException("Unable to write raw log file to " + rawFile.getAbsolutePath(), e);
 }
}
origin: com.shazam.fork/fork

  @Nullable
  @Override
  public HtmlLogCatMessage apply(@Nullable LogCatMessage logCatMessage) {
    HtmlLogCatMessage htmlLogCatMessage = new HtmlLogCatMessage();
    htmlLogCatMessage.appName = logCatMessage.getAppName();
    htmlLogCatMessage.logLevel = logCatMessage.getLogLevel().getStringValue();
    htmlLogCatMessage.message = logCatMessage.getMessage();
    htmlLogCatMessage.pid = logCatMessage.getPid();
    htmlLogCatMessage.tag = logCatMessage.getTag();
    htmlLogCatMessage.tid = logCatMessage.getTid();
    htmlLogCatMessage.time = logCatMessage.getTimestamp().toString();
    return htmlLogCatMessage;
  }
};
origin: com.jdfind.spoon/spoon-runner

static LogEntry from(LogCatMessage message) {
 String rowClass;
 switch (message.getLogLevel()) {
  case ERROR:
   rowClass = "error";
   break;
  case WARN:
   rowClass = "warning";
   break;
  case INFO:
   rowClass = "info";
   break;
  default:
   rowClass = "";
 }
 String timestamp = message.getTimestamp().toString();
 String level = message.getLogLevel().getStringValue();
 return new LogEntry(rowClass, timestamp, level, message.getTag(), message.getMessage());
}
origin: square/spoon

static LogEntry from(LogCatMessage message) {
 String rowClass;
 switch (message.getLogLevel()) {
  case ERROR:
   rowClass = "error";
   break;
  case WARN:
   rowClass = "warning";
   break;
  case INFO:
   rowClass = "info";
   break;
  default:
   rowClass = "";
 }
 String timestamp = message.getTimestamp().toString();
 String level = message.getLogLevel().getStringValue();
 return new LogEntry(rowClass, timestamp, level, message.getTag(), message.getMessage());
}
com.android.ddmlibLog$LogLevelgetStringValue

Javadoc

Returns a non translated string representing the LogLevel.

Popular methods of Log$LogLevel

  • getByLetter
    Returns the LogLevel enum matching the specified letter.
  • getByString
  • getPriority
    Returns the numerical value of the priority.
  • getPriorityLetter
    Returns the letter identifying the priority of the LogLevel.
  • values
  • getByLetterString
    Returns the LogLevel enum matching the specified letter. The letter is passed as a String argument,

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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