StdoutLogger
  public
  
  
  
  class
  StdoutLogger
  
    extends Object
  
  
  
  
  
      implements
      
        ILeveledLogOutput
      
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.log.StdoutLogger | 
A ILeveledLogOutput that directs log messages to stdout.
Summary
Public constructors | |
|---|---|
      
      StdoutLogger()
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        ILeveledLogOutput
     | 
  
    
      
      clone()
      
      
     | 
  
        
        
        
        
        
        void
     | 
  
    
      
      closeLog()
      
      
        Closes the log and performs any cleanup before closing, as necessary.  | 
  
        
        
        
        
        
        InputStreamSource
     | 
  
    
      
      getLog()
      
      
        Grabs a snapshot stream of the log data.  | 
  
        
        
        
        
        
        Log.LogLevel
     | 
  
    
      
      getLogLevel()
      
      
        Gets the minimum log level to display.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      init()
      
      
        Initialize the log, creating any required IO resources.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      printAndPromptLog(Log.LogLevel logLevel, String tag, String message)
      
      
        Sent when a log message needs to be printed, and, if possible, displayed to the user in a dialog box.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      printLog(Log.LogLevel logLevel, String tag, String message)
      
      
        Sent when a log message needs to be printed.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      setLogLevel(Log.LogLevel logLevel)
      
      
        Sets the minimum log level to display.  | 
  
Public constructors
StdoutLogger
public StdoutLogger ()
Public methods
closeLog
public void closeLog ()
Closes the log and performs any cleanup before closing, as necessary.
getLog
public InputStreamSource getLog ()
Grabs a snapshot stream of the log data.
Must not be called after ILeveledLogOutput.closeLog().
 
The returned stream is not guaranteed to have optimal performance. Callers may wish to
 wrap result in a ERROR(/BufferedInputStream).
| Returns | |
|---|---|
InputStreamSource | 
        a InputStreamSource of the log data. May return null if not supported. | 
      
getLogLevel
public Log.LogLevel getLogLevel ()
Gets the minimum log level to display.
| Returns | |
|---|---|
Log.LogLevel | 
        the current LogLevel | 
      
init
public void init ()
Initialize the log, creating any required IO resources.
printAndPromptLog
public void printAndPromptLog (Log.LogLevel logLevel, String tag, String message)
Sent when a log message needs to be printed, and, if possible, displayed to the user in a dialog box.
| Parameters | |
|---|---|
logLevel | 
        
          Log.LogLevel: The LogLevel enum representing the priority of the message. | 
      
tag | 
        
          String: The tag associated with the message. | 
      
message | 
        
          String: The message to display. | 
      
printLog
public void printLog (Log.LogLevel logLevel, String tag, String message)
Sent when a log message needs to be printed.
| Parameters | |
|---|---|
logLevel | 
        
          Log.LogLevel: The LogLevel enum representing the priority of the message. | 
      
tag | 
        
          String: The tag associated with the message. | 
      
message | 
        
          String: The message to display. | 
      
setLogLevel
public void setLogLevel (Log.LogLevel logLevel)
Sets the minimum log level to display.
| Parameters | |
|---|---|
logLevel | 
        
          Log.LogLevel: the LogLevel to display |