文件记录器
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 |
ILeveledLogOutput
将日志消息定向到文件和标准输出。
概括
公共构造函数 | |
---|---|
FileLogger () |
公共方法 | |
---|---|
ILeveledLogOutput | clone () 使用与当前对象相同的日志级别设置创建一个新的 |
void | closeLog () |
InputStreamSource | getLog () |
long | getMaxLogSizeMbytes () 以 MBytes 返回日志的最大日志大小。 |
void | init () |
受保护的方法 | |
---|---|
void | init (String logPrefix, String fileSuffix) |
公共构造函数
文件记录器
public FileLogger ()
公共方法
克隆
public ILeveledLogOutput clone ()
使用与当前对象相同的日志级别设置创建一个新的FileLogger
。
退货 | |
---|---|
ILeveledLogOutput |
关闭日志
public void closeLog ()
getMaxLogSizeMbytes
public long getMaxLogSizeMbytes ()
以 MBytes 返回日志的最大日志大小。
退货 | |
---|---|
long |
在里面
public void init ()
受保护的方法
在里面
protected void init (String logPrefix, String fileSuffix)
init()
的替代方法,我们可以在其中指定文件名和后缀。
参数 | |
---|---|
logPrefix | String : 不带扩展名的记录文件名。 |
fileSuffix | String : 要记录的文件的扩展名。 |