Crate xvc_logging

Source
Expand description

Xvc logging and output crate to be used in output channels. Xvc uses to discriminate outputs of various types, (Info, Debug, Error…) and can use crossbeam_channel to send these separately. Downstream crates (xvc, xvc-file, etc.) use this crate not to use stdout, stderr directly.

Macros§

debug
Either send XvcOutputLine::Debug to the given channel, or log via log crate
error
Either send a XvcOutputLine::Error value to the given channel, or log via log crate
info
Either send XvcOutputLine::Info to the given channel, or log via log crate
output
Either send XvcOutputLine::Output to the given channel, or print to stdout
panic
Either send XvcOutputLine::Panic to the given channel, or print to stdout
tick
Either send XvcOutputLine::Tick to the given channel, or print dots to stdout
trace
Either send [XvcOutputLine::Trace] to the given channel, or log via log crate
uwo
Unwrap an option, and if it is an error, send it to the given channel and panic. This is mostly to be used in for_each blocks, where the error is not propagated.
uwr
Unwrap the result of an expression, and if it is an error, send it to the given channel and panic. This is mostly to be used in for_each blocks, where the error is not propagated.
warn
Either send XvcOutputLine::Warn to the given channel, or log via log crate
watch
Debugging macro to print the given expression and its value, with the module, function and line number

Enums§

XvcOutputLine
Different channels of outputs Xvc can print

Functions§

setup_logging
Init logging if it’s not initialized before. Uses Once to run (non-public fn) init_logging once.

Type Aliases§

XvcOutputSender
The channel type to send and receive output/log/debug messages