Puree

actual class Puree

Android implementation of the Puree builder class for creating and configuring a PureeLogger instance.

Parameters

logStore

Storage for persisting logs

logSerializer

Serializer to convert log objects to JSON format (defaults to DefaultPureeLogSerializer)

lifecycle

The application lifecycle used to manage logging states (defaults to the default lifecycle owner's lifecycle)

expect class Puree

Builder class for creating and configuring a PureeLogger instance.

This class provides methods for configuring filters and outputs for different log types, and a build method for creating a PureeLogger with the configured settings.

Platform-specific implementations may have different constructor parameters and methods for registering log types, filters, and outputs.

actual class Puree

iOS implementation of the Puree builder class for creating and configuring a PureeLogger instance.

This class provides methods for configuring filters and outputs for different log types, and a build method for creating a PureeLogger with the configured settings.

Parameters

logStore

Storage for persisting logs

logSerializer

Serializer to convert log objects to JSON format

Constructors

Link copied to clipboard
constructor(logStore: PureeLogStore, logSerializer: PureeLogSerializer = DefaultPureeLogSerializer(), lifecycle: Lifecycle = DefaultLifecycleOwner.lifecycle)
constructor(logStore: <Error class: unknown class>, logSerializer: <Error class: unknown class>)

Functions

Link copied to clipboard

Builds and returns a configured PureeLogger instance.

fun build(): <Error class: unknown class>

Builds and returns a configured PureeLogger instance.

Link copied to clipboard
fun defaultFilter(vararg filters: PureeFilter): Puree

Registers the default filter.

fun defaultFilter(vararg filters: <Error class: unknown class>): Puree

Registers the default filter.

Link copied to clipboard
fun defaultOutput(vararg outputs: PureeOutput): Puree

Registers the default output destination.

fun defaultOutput(vararg outputs: <Error class: unknown class>): Puree

Registers the default output destination.

Link copied to clipboard
fun excludeFromDefaults(vararg logTypes: KClass<out PureeLog>): Puree

Excludes the specified log types from the default filters and outputs.

fun excludeFromDefaults(logTypes: NSArray): Puree

Excludes the specified log types from the default filters and outputs.

Link copied to clipboard
fun filter(filter: PureeFilter, vararg logTypes: KClass<out PureeLog>): Puree

Registers a filter to be applied to the specified log types.

fun filter(filter: <Error class: unknown class>, logTypes: NSArray): Puree

Registers a filter to be applied to the specified log types.

Link copied to clipboard
fun output(output: PureeOutput, vararg logTypes: KClass<out PureeLog>): Puree

Registers an output destination for the specified log types.

fun output(output: <Error class: unknown class>, logTypes: NSArray): Puree

Registers an output destination for the specified log types.