Skip to main content

Crate re_log

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.

In the viewer these logs, if >= info, become notifications. See re_ui::notifications for more information.

Modules§

external
Re-exports of other crates.

Macros§

debug
Constructs an event at the debug level.
debug_assert
Like std::debug_assert!, but prefixes any failure message with “DEBUG ASSERT”.
debug_assert_eq
Like std::debug_assert_eq!, but prefixes any failure message with “DEBUG ASSERT”.
debug_once
Logs a message once at the debug level.
debug_panic
Panics in debug builds with a “DEBUG PANIC: “ prefix.
debug_warn
Log a warning in debug builds, or a debug message in release builds.
debug_warn_once
Like debug_warn!, but only logs once per call site.
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
Log once at the given Level.
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§

Level
Describes the level of verbosity of a span or event.
LevelFilter
A filter comparable to a verbosity Level.
LogMsg
PanicOnWarnScope
Scope for enabling panic on warn/error log messages temporariliy on the current thread (!).
Receiver
The receiving side of a channel.
Sender
The sending side of a channel.

Traits§

ResultExt

Functions§

add_log_msg_receiver
Register a new receiver for log messages.
default_log_filter
Determines the default log filter.
env_var_is_truthy
Check if an environment variable is set to a truthy value.
is_rerun_very_strict
Is RERUN_VERY_STRICT set to a truthy value?
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.