FileLogger

public class FileLogger
extends BaseStreamLogger<SizeLimitedOutputStream>

java.lang.Object
   ↳ com.android.tradefed.log.BaseLeveledLogOutput
     ↳ com.android.tradefed.log.BaseStreamLogger<com.android.tradefed.util.SizeLimitedOutputStream>
       ↳ com.android.tradefed.log.FileLogger


A ILeveledLogOutput that directs log messages to a file and to stdout.

Summary

Public constructors

FileLogger()

Public methods

ILeveledLogOutput clone()

Creates a new FileLogger with the same log level settings as the current object.

void closeLog()
InputStreamSource getLog()
long getMaxLogSizeMbytes()

Returns the max log size of the log in MBytes.

void init()

Protected methods

void init(String logPrefix, String fileSuffix)

Alternative to init() where we can specify the file name and suffix.

Public constructors

FileLogger

public FileLogger ()

Public methods

clone

public ILeveledLogOutput clone ()

Creates a new FileLogger with the same log level settings as the current object.

Does not copy underlying log file content (ie the clone's log data will be written to a new file.)

Returns
ILeveledLogOutput

closeLog

public void closeLog ()

getLog

public InputStreamSource getLog ()

Returns
InputStreamSource

getMaxLogSizeMbytes

public long getMaxLogSizeMbytes ()

Returns the max log size of the log in MBytes.

Returns
long

init

public void init ()

Protected methods

init

protected void init (String logPrefix, 
                String fileSuffix)

Alternative to init() where we can specify the file name and suffix.

Parameters
logPrefix String: the file name where to log without extension.

fileSuffix String: the extension of the file where to log.