FileLogger
A file-based logger that writes log messages to a specified file asynchronously. This logger supports different file format. Each entry is formatted with a timestamp, log level, and tag.
Parameters
The context used to access the file directory and creating LogcatLogger instance.
The directory path where the log file will be created or exists.
The name of the file to write logs to. Defaults to DEFAULT_FILE_NAME.
The format in which logs will be written. Defaults to FileFormat.Logcat.
Constructors
Functions
Logs a message with the specified level, tag, and message by writing it to a log file. The actual logging operation is delegated to a specific logger implementation based on the format specified for this FileLogger. The logging operation is performed asynchronously to avoid blocking the caller's thread.