to top
public class

LogUtil

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

Class Overview

A logging utility class. Useful for code that needs to override static methods from Log

Summary

Nested Classes
class LogUtil.CLog A shim class for Log that automatically uses the simple classname of the caller as the log tag  
Public Methods
static String getLogFormatString(Log.LogLevel logLevel, String tag, String message)
Creates a format string that is similar to the "threadtime" log format on the device.
static void printLog(Log.LogLevel logLevel, String tag, String message)
Sent when a log message needs to be printed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static String getLogFormatString (Log.LogLevel logLevel, String tag, String message)

Creates a format string that is similar to the "threadtime" log format on the device. This is specifically useful because it includes the day and month (to differentiate times for long-running TF instances), and also uses 24-hour time to disambiguate morning from evening.

public static void printLog (Log.LogLevel logLevel, String tag, String message)

Sent when a log message needs to be printed. This implementation prints the message to stdout in all cases.

Parameters
logLevel The Log.LogLevel enum representing the priority of the message.
tag The tag associated with the message.
message The message to display.