AndroidStore

class AndroidStore(val fileRoot: File, val fileNamePrefix: String, val fileNameDateSuffixSdf: SimpleDateFormat, val fileMaxSize: Long, val logFormat: LogFormat) : LogScope, LogStore

Android log store.

Since

1.3.1

Constructors

Link copied to clipboard
internal constructor(fileRoot: File, fileNamePrefix: String, fileNameDateSuffixSdf: SimpleDateFormat, fileMaxSize: Long, logFormat: LogFormat)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The size of a single log file(in bytes).

Link copied to clipboard

Date format of file name date suffix.

Link copied to clipboard

File name prefix.

Link copied to clipboard

Folder to store log files.

Link copied to clipboard
open override val logFormat: LogFormat

The log format in file.

Link copied to clipboard
private var mCurrentFile: File

Current file which will save log.

Link copied to clipboard
private val mFileName: String

The name of the log file.

Link copied to clipboard
private val mLogSp: LogSp

LogSp is used to save the log file name of the last operation.

Functions

Link copied to clipboard
private fun getCurrentFile(appendFile: Boolean = false): File

Get file.

Link copied to clipboard
private fun File.getCurrentSize(): Long

Get current size of the specified file.

Link copied to clipboard
private fun storage(logInfo: LogInfo)

Storage the logInfo to file.

private fun File.storage(message: String)

Save the message to the specified file.

Link copied to clipboard
open override fun store(logInfo: LogInfo)