FileLogger

open class FileLogger

A simple file logger that works with SalesforceLogger to write log entries to a file.

Author

bhariharan

Constructors

Link copied to clipboard
constructor(context: Context, componentName: String)
Parameterized constructor.

Properties

Link copied to clipboard
open var maxSize: Int

Functions

Link copied to clipboard
open fun addLogLine(logLine: String)
Writes a log line to the file.
Link copied to clipboard
open fun addLogLines(logLines: Array<String>)
Writes an array of log lines to the file.
open fun addLogLines(logLines: List<String>)
Writes a list of log lines to the file.
Link copied to clipboard
open fun flushLog()
Flushes the log file and resets it to its original state.
Link copied to clipboard
open fun getSize(): Int
Returns the number of log lines stored in this file.
Link copied to clipboard
Returns all log lines stored in FIFO and removes them as they are being read.
Link copied to clipboard
Returns all log lines stored in FIFO and removes them as they are being read.
Link copied to clipboard
Returns an array of log lines in FIFO and removes them as they are being read.
Link copied to clipboard
Returns a list of log lines in FIFO and removes them as they are being read.
Link copied to clipboard
open fun readLogLine(): String
Returns a single log line in FIFO.
Link copied to clipboard
open fun removeLogLine()
Removes the first log line in the file.
Link copied to clipboard
open fun removeLogLines(numLines: Int)
Removes the specified number of log lines from the file in FIFO.
Link copied to clipboard
open fun resetFileLoggerPrefs(context: Context)
Resets the stored file logger prefs.