public static class

LogUtil.CLog

extends Object
java.lang.Object
   ↳ com.android.tradefed.log.LogUtil.CLog

Class Overview

A shim class for Log that automatically uses the simple classname of the caller as the log tag

Summary

Public Constructors
LogUtil.CLog()
Public Methods
static void d(String message)
The shim version of d(String, String).
static void d(String format, Object... args)
The shim version of d(String, String).
static void e(String format, Object... args)
The shim version of e(String, String).
static void e(String message)
The shim version of e(String, String).
static void e(Throwable t)
The shim version of e(String, Throwable).
static String getClassName(int frame)
Return the simple classname from the frameth stack frame in the call path.
static void i(String message)
The shim version of i(String, String).
static void i(String format, Object... args)
The shim version of i(String, String).
static void logAndDisplay(Log.LogLevel logLevel, String format, Object... args)
static void v(String format, Object... args)
The shim version of v(String, String).
static void v(String message)
The shim version of v(String, String).
static void w(String message)
The shim version of w(String, String).
static void w(String format, Object... args)
The shim version of w(String, String).
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LogUtil.CLog ()

Public Methods

public static void d (String message)

The shim version of d(String, String).

Parameters
message The String to log

public static void d (String format, Object... args)

The shim version of d(String, String). Also calls String.format for convenience.

Parameters
format A format string for the message to log
args The format string arguments

public static void e (String format, Object... args)

The shim version of e(String, String). Also calls String.format for convenience.

Parameters
format A format string for the message to log
args The format string arguments

public static void e (String message)

The shim version of e(String, String).

Parameters
message The String to log

public static void e (Throwable t)

The shim version of e(String, Throwable).

Parameters
t the Throwable to output.

public static String getClassName (int frame)

Return the simple classname from the frameth stack frame in the call path. Note: this method does not check array bounds for the stack trace length.

Parameters
frame The index of the stack trace frame to inspect for the class name
Returns
  • The simple class name (or full-qualified if an error occurs getting a ref to the class) for the given element of the stack trace.

public static void i (String message)

The shim version of i(String, String).

Parameters
message The String to log

public static void i (String format, Object... args)

The shim version of i(String, String). Also calls String.format for convenience.

Parameters
format A format string for the message to log
args The format string arguments

public static void logAndDisplay (Log.LogLevel logLevel, String format, Object... args)

Parameters
logLevel the Log.LogLevel
format A format string for the message to log
args The format string arguments

public static void v (String format, Object... args)

The shim version of v(String, String). Also calls String.format for convenience.

Parameters
format A format string for the message to log
args The format string arguments

public static void v (String message)

The shim version of v(String, String).

Parameters
message The String to log

public static void w (String message)

The shim version of w(String, String).

Parameters
message The String to log

public static void w (String format, Object... args)

The shim version of w(String, String). Also calls String.format for convenience.

Parameters
format A format string for the message to log
args The format string arguments