LogFileConfiguration

expect class LogFileConfiguration(directory: String)(source)

A class that describes the file configuration for the FileLogger class. These options must be set atomically, so they won't take effect unless a new configuration object is set on the logger. Attempting to modify an in-use configuration object will result in an exception being thrown.

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 (i.e. if the value is 1, then 2 logs will be present: the 'current' and the 'rotated')

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.

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

Whether or not CBL is logging in plaintext. The default is to log in a binary encoded format that is more CPU and I/O friendly and 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 (i.e. if the value is 1, then 2 logs will be present: the 'current' and the 'rotated')

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.

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 to log in plaintext. The default is to log in a binary encoded format that is more CPU and I/O friendly and 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