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 | ||
用于将日志消息定向到文件和标准输出的 ILeveledLogOutput。
摘要
公共构造函数 | |
|---|---|
FileLogger()
|
|
公共方法 | |
|---|---|
ILeveledLogOutput
|
clone()
创建一个新的 |
void
|
closeLog()
|
InputStreamSource
|
getLog()
|
long
|
getMaxLogSizeMbytes()
返回日志的大小上限(以兆字节为单位)。 |
void
|
init()
|
受保护的方法 | |
|---|---|
void
|
init(String logPrefix, String fileSuffix)
|
公共构造函数
FileLogger
public FileLogger ()
公共方法
clone
public ILeveledLogOutput clone ()
创建一个与当前对象具有相同日志级别设置的新 FileLogger。
不会复制底层日志文件内容(即克隆的日志数据将写入新文件)。
| 返回 | |
|---|---|
ILeveledLogOutput |
|
closeLog
public void closeLog ()
getMaxLogSizeMbytes
public long getMaxLogSizeMbytes ()
返回日志的大小上限(以兆字节 [MB] 为单位)。
| 返回 | |
|---|---|
long |
|
init
public void init ()
受保护的方法
init
protected void init (String logPrefix,
String fileSuffix)init() 的替代方案,我们可以在此处指定文件名和后缀。
| 参数 | |
|---|---|
logPrefix |
String:日志记录文件名(不带扩展名)。 |
fileSuffix |
String:日志记录文件的扩展名。 |