android

fun Logger.Companion.android(maxSingleLogLength: Int = DEFAULT_MAX_SINGLE_LOG_LENGTH, maxPrintTimes: Int = DEFAULT_MAX_PRINT_TIMES, header: TableFormat.LogHeader = TableFormat.LogHeader(thread = true, tag = true, level = true, time = true)): AndroidLogger

Android Logger.

val mLogFactory: LogFactory = getLogFactory {
...
install(LogPrinter) {
logger = Logger.android(30,5)
}
}

Since

1.3.1

Parameters

maxSingleLogLength

The max length of single line of log. every char in line is calculated as 4 bytes.

maxPrintTimes

The total repeat number of prints. For example, the log content is divided into ten lines depending on maxSingleLogLength. If you set maxPrintTimes to 5, only the first five lines will be printed.

See also


Android Logger with custom LogFormat.

Since

1.5.0


fun LogStore.Companion.android(fileRoot: File = File(FileMgr.appInternalFilesDir(), "log"), fileNamePrefix: String = AppUtils.getAppName(), fileNameDateSuffixSdf: SimpleDateFormat = fileNameTimeSdf, @IntRange(from = 0, to = 9223372036854775807) fileMaxSize: Long = 1000 * 1024L, logFormat: LogFormat = TableFormat.LogHeader.default.let { TableFormat(DEFAULT_MAX_SINGLE_LOG_LENGTH, DEFAULT_MAX_PRINT_TIMES, it) }): AndroidStore

Android LogStore.

val mLogFactory: LogFactory = getLogFactory {
...
install(LogStorage) {
logStore = LogStore.android()
}
}

Since

1.3.1