Kameleoon. Logger behaviour
(kameleoon_client v0.8.5)
Copy Markdown
Logger configuration for messages emitted by the native Kameleoon Core.
The logger is global because the underlying Rust Core logger is global.
Summary
Functions
Sets the minimum log level emitted by the native Core.
Routes native Core logs to a custom logger.
Types
@type level() :: :none | :error | :warning | :info | :debug
@type logger() :: module()
Callbacks
Functions
@spec set_log_level(level()) :: :ok
Sets the minimum log level emitted by the native Core.
Defaults to :warning.
@spec set_logger(logger() | nil) :: :ok | {:error, Kameleoon.Error.t()}
Routes native Core logs to a custom logger.
The logger must be a module implementing log/2. Pass nil to reset
logging back to the Core default logger.