Module log/index

log/index

Structured logging with configurable level and output destination.

Types

Level enum
Level

Log severity level.

Variants

VariantFieldsDescription
Trace
Debug
Info
Warn
Error

Trait Implementations

impl(Level, ToString(...))
to_string : (fn(self: *(Self)) -> String)

Returns: String

LogOutput enum
LogOutput

Where log messages are written.

Variants

VariantFieldsDescription
Stderr
Stdout

Functions

set_level function
fn(level : Level) -> unit

Parameters

NameTypeNotes
levelLevel

Returns: unit

set_output function
fn(output : LogOutput) -> unit

Parameters

NameTypeNotes
outputLogOutput

Returns: unit

log function
fn(level : Level, msg : String) -> unit

Parameters

NameTypeNotes
levelLevel
msgString

Returns: unit

trace function
fn(msg : String) -> unit

Parameters

NameTypeNotes
msgString

Returns: unit

debug function
fn(msg : String) -> unit

Parameters

NameTypeNotes
msgString

Returns: unit

info function
fn(msg : String) -> unit

Parameters

NameTypeNotes
msgString

Returns: unit

warn function
fn(msg : String) -> unit

Parameters

NameTypeNotes
msgString

Returns: unit

error function
fn(msg : String) -> unit

Parameters

NameTypeNotes
msgString

Returns: unit