Skip to main content

Module debug

Module debug 

Source
Expand description

Opt-in tracing for the codec.

Tracing is off by default and writes nothing. It is turned on either by setting the LINO_CODEC_DEBUG environment variable to a truthy value (1, true, yes, on) or by calling set_debug_enabled from code.

The same switch and the same environment variable exist in the JavaScript, Python and C# implementations, so a problem can be traced the same way in every language.

Constants§

DEBUG_ENV_VAR
Name of the environment variable that turns tracing on.

Functions§

is_debug_enabled
Whether tracing is currently on.
set_debug_enabled
Turn tracing on or off from code, overriding the environment variable.
trace
Emit a trace message when tracing is on.