Crate re_log

Source
Expand description

Text logging (nothing to do with rerun logging) for use in rerun libraries.

Provides helpers for adding multiple loggers, and for setting up logging on native and on web.

  • trace: spammy things
  • debug: things that might be useful when debugging
  • info: things that we want to show to users
  • warn: problems that we can recover from
  • error: problems that lead to loss of functionality or data

The warn_once etc macros are for when you want to suppress repeated logging of the exact same message.

Modules§

external
Re-exports of other crates.

Macros§

debug
Constructs an event at the debug level.
debug_once
Logs a message once at the debug level.
error
Constructs an event at the error level.
error_once
Logs a message once at the error level.
info
Constructs an event at the info level.
info_once
Logs a message once at the info level.
log_once
Standard logging macro, logging events once for each arguments.
trace
Constructs an event at the trace level.
trace_once
Logs a message once at the trace level.
warn
Constructs an event at the warn level.
warn_once
Logs a message once at the warn level.

Structs§

ChannelLogger
Pipe log messages to a channel.
LogMsg
MultiLoggerNotSetupError
Produced when trying to install additional loggers when crate::setup_logging has not been called.
PanicOnWarnScope
Scope for enabling panic on warn/error log messages temporariliy on the current thread (!).

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§

ResultExt

Functions§

add_boxed_logger
Install an additional global logger.
add_logger
Install an additional global logger.
default_log_filter
Determines the default log filter.
log_filter_from_env_or_default
Determines the log filter from the RUST_LOG environment variable or an explicit default.
setup_logging
Sets up logging for the current process using default log filter as defined in crate::default_log_filter.
setup_logging_with_filter
Sets up logging for the current process using an explicit log filter.