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§

  • Either send XvcOutputLine::Debug to the given channel, or log via log crate
  • Either send a XvcOutputLine::Error value to the given channel, or log via log crate
  • Either send XvcOutputLine::Info to the given channel, or log via log crate
  • Either send XvcOutputLine::Output to the given channel, or print to stdout
  • Either send XvcOutputLine::Panic to the given channel, or print to stdout
  • Either send XvcOutputLine::Tick to the given channel, or print dots to stdout
  • Either send [XvcOutputLine::Trace] to the given channel, or log via log crate
  • 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.
  • 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.
  • Either send XvcOutputLine::Warn to the given channel, or log via log crate
  • Debugging macro to print the given expression and its value, with the module, function and line number

Enums§

Functions§

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

Type Aliases§

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