Expand description
Logging functions and configuration for WaterDropEngine using tracing.
The logging behavior can be configured using the LogPlugin, which allows you to set the log level, filter logs using EnvFilter syntax, and add custom layers to the tracing subscriber. The RUST_LOG environment variable can also be used to override plugin settings and configure log filtering.
This crate provides multiple macros for logging, including:
trace!()- Verbose tracing information, typically only useful for debugging.debug!()- Debug information, useful for development and debugging.info!()- General information about the application’s operation.warn!()- Important warnings that may indicate potential issues.error!()- Critical errors that indicate failures in the application.
Each of these macros also has a corresponding _once variant (e.g. info_once!()) that will only log the message once per call site, which is useful for logging within systems that are called every frame without spamming the logs.
Lastly, span tracing is supported using the *_span!() macros (e.g. info_span!()) which can be used to create spans for better structuring of logs and performance profiling.
Re-exports§
pub use tracing;
Modules§
Macros§
- debug
- Constructs an event at the debug level.
- debug_
once - Call
debug!once per call site. - debug_
span - Constructs a span at the debug level.
- error
- Constructs an event at the error level.
- error_
once - Call
error!once per call site. - error_
span - Constructs a span at the error level.
- info
- Constructs an event at the info level.
- info_
once - Call
info!once per call site. - info_
span - Constructs a span at the info level.
- once
- Call some expression only once per call site.
- trace
- Constructs an event at the trace level.
- trace_
once - Call
trace!once per call site. - trace_
span - Constructs a span at the trace level.
- warn
- Constructs an event at the warn level.
- warn_
once - Call
warn!once per call site. - warn_
span - Constructs a span at the warn level.
Structs§
- LogLevel
- Describes the level of verbosity of a span or event.
- LogPlugin
- Plugin that configures logging for WaterDropEngine applications.
- Once
Flag - Wrapper around an
AtomicBool, abstracting the backing implementation and ordering considerations.