LogFileConfiguration

expect class LogFileConfiguration(directory: String)(source)

A class that describes the file configuration for the FileLogger class. Once a configuration has been assigned to a Logger, it becomes read-only: an attempt to mutate it will cause an exception. To change the configuration of a logger, copy its configuration, mutate the copy and then use it to replace the loggers current configuration.

actual class LogFileConfiguration(directory: String) : DelegatedClass<<Error class: unknown class>> (source)
actual class LogFileConfiguration(val directory: String)(source)

Constructors

Link copied to clipboard
expect constructor(directory: String)

Constructs a file configuration object with the given directory

expect constructor(config: LogFileConfiguration)

Constructs a file configuration object based on another one so that it may be modified

expect constructor(directory: String, config: LogFileConfiguration?)

Constructs a file configuration object based on another one but changing the directory

actual constructor(directory: String)
actual constructor(config: LogFileConfiguration)
actual constructor(directory: String, config: LogFileConfiguration?)
actual constructor(directory: String)
actual constructor(config: LogFileConfiguration)
actual constructor(directory: String, config: LogFileConfiguration?)

Properties

Link copied to clipboard
expect val directory: String

The directory that the logs files are stored in.

actual val directory: String
actual val directory: String
Link copied to clipboard
expect var maxRotateCount: Int

The number of rotated logs that are saved. For instance, if the value is 1 then 2 logs will be present: the 'current' log and the previous 'rotated' log. The default value is 1.

actual var maxRotateCount: Int
actual var maxRotateCount: Int
Link copied to clipboard
expect var maxSize: Long

The max size of the log file in bytes. If a log file passes this size then a new log file will be started. This number is a best effort and the actual size may go over slightly. The default size is 500Kb.

actual var maxSize: Long
actual var maxSize: Long
Link copied to clipboard

Whether or not CBL is logging in plaintext. The default (false) is to log in a binary encoded format that is more CPU and I/O friendly. Enabling plaintext is not recommended in production.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
fun LogFileConfiguration?.newConfig(directory: String? = null, maxSize: Long? = null, maxRotateCount: Int? = null, usePlainText: Boolean? = null): LogFileConfiguration

Create a LogFileConfiguration, overriding the receiver's values with the passed parameters:

Link copied to clipboard
expect fun setMaxRotateCount(maxRotateCount: Int): LogFileConfiguration

Sets the number of rotated logs that are saved. For instance, if the value is 1 then 2 logs will be present: the 'current' log and the previous 'rotated' log. The default value is 1.

actual fun setMaxRotateCount(maxRotateCount: Int): LogFileConfiguration
actual fun setMaxRotateCount(maxRotateCount: Int): LogFileConfiguration
Link copied to clipboard
expect fun setMaxSize(maxSize: Long): LogFileConfiguration

Sets the max size of the log file in bytes. If a log file passes this size then a new log file will be started. This number is a best effort and the actual size may go over slightly. The default size is 500Kb.

actual fun setMaxSize(maxSize: Long): LogFileConfiguration
actual fun setMaxSize(maxSize: Long): LogFileConfiguration
Link copied to clipboard
expect fun setUsePlaintext(usePlaintext: Boolean): LogFileConfiguration

Sets whether or not CBL logs in plaintext. The default (false) is to log in a binary encoded format that is more CPU and I/O friendly. Enabling plaintext is not recommended in production.

actual fun setUsePlaintext(usePlaintext: Boolean): LogFileConfiguration
actual fun setUsePlaintext(usePlaintext: Boolean): LogFileConfiguration
Link copied to clipboard
open override fun toString(): String