Crate log

Source
Expand description

This crate provides logging functions and configuration for Bevy apps, and automatically configures platform specific log handlers (i.e. Wasm or Android).

The macros provided for logging are reexported from tracing, and behave identically to it.

By default, the LogPlugin from this crate is included in Bevy’s DefaultPlugins and the logging macros can be used out of the box, if used.

For more fine-tuned control over logging behavior, set up the LogPlugin or DefaultPlugins during app initialization.

Modules§

prelude
The log prelude.
tracing_subscriber
Utilities for implementing and composing tracing subscribers.

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§

Level
Describes the level of verbosity of a span or event.
LogPlugin
Adds logging to Apps. This plugin is part of the DefaultPlugins. Adding this plugin will setup a collector appropriate to your target platform:

Constants§

DEFAULT_FILTER
The default LogPlugin EnvFilter.

Type Aliases§

BoxedLayer
A boxed Layer that can be used with LogPlugin.