Skip to main content

Module log

Module log 

Source
Expand description

Logging facilities, re-exported from the workflow-log crate.

Modules§

color_log
Trait helpers for emitting a type’s binary data as a colorized hex dump.
impls
Backing implementation functions invoked by the log_*! macros to route messages to the sink, browser console, Solana log, or standard output.
levels
Self-contained Level and LevelFilter definitions, mirroring the log crate for use on targets where that crate is not embedded (e.g. BPF).
prelude
Convenient re-exports of the most commonly used logging macros, level types and console helpers for glob importing.

Macros§

log_debug
Format and log message with Level::Debug
log_error
Format and log message with Level::Error
log_info
Format and log message with Level::Info
log_trace
Format and log message with Level::Trace
log_warn
Format and log message with Level::Warn

Structs§

Buffer
Write colored text to memory.
ColorHexView
Builder wrapper around a HexViewBuilder that accumulates colored ranges of a hex data dump and renders them via ColorHexView::try_print.
HexViewBuilder
A builder for the HexView struct.

Enums§

Level
An enum representing the available verbosity levels of the logger.
LevelFilter
An enum representing the available verbosity level filters of the logger.

Traits§

ColoLogTrace
Implemented by types that can render themselves as a colorized hex dump via log_trace.
Sink
A log sink trait that can be installed into the log subsystem using the [pipe] function and will receive all log messages.

Functions§

format_hex
Returns a string formatted as a hex data dump of the supplied slice argument.
format_hex_with_colors
Formats a hex data dump to contain color ranges
log_level_enabled
Returns true if the current log level is below the currently set LevelFilter
set_colors_enabled
Enables or disables ANSI color output produced by style.
set_log_level
Enable filtering of log messages using the LevelFilter
style
Wraps an object for formatting for styling.
trace_hex
Prints (using log_trace) a data slice formatted as a hex data dump.