Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

log.dispatch

import log

Everything here is re-exported by log, so import log is enough and the names are called as log.*. Importing log.dispatch on its own works too and reaches the same definitions.

The default transport instance and the module-level functions that configure it.

Functions

set_level()

log.set_level(level)

Sets the threshold level for the default transport to handle.

Parameters

  • level (log.LogLevel)

Returns — default_transport

set_name()

log.set_name(name)

Sets the name of the default transport.

Parameters

  • name (string)

Returns — default_transport

default_transport()

log.default_transport() -> [[log.ConsoleTransport]]

Returns the instance [[log.ConsoleTransport]] which is used as the default transport by the module.

Returns [[log.ConsoleTransport]]