
# Objective - Fixes #18781 ## Solution - Moved `LogPlugin` into its own file gated behind a new `tracing` feature. - Used `log` instead of `tracing` where possible. - Exposed a new `tracing` feature in `bevy` which enables `bevy_log/tracing`. - Gated `LogPlugin` from `DefaultPlugins` on `tracing` feature. ## Testing - CI --- ## Migration Guide - If you were previously using `bevy_log` with default features disabled, enable the new `std` and `tracing` features. - If you were using `bevy` with the default features disabled, enable the new `tracing` feature. ## Notes Almost all of the diffs in this PR come from moving `LogPlugin` into its own file. This just makes the PR less noisy, since the alternative is excessive `#[cfg(feature = "tracing")]` directives all over the plugin. --------- Co-authored-by: François Mockers <francois.mockers@vleue.com>
71 lines
2.3 KiB
TOML
71 lines
2.3 KiB
TOML
[package]
|
|
name = "bevy_log"
|
|
version = "0.16.0-dev"
|
|
edition = "2024"
|
|
description = "Provides logging for Bevy Engine"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[features]
|
|
default = ["std", "tracing"]
|
|
|
|
tracing = ["dep:tracing", "dep:tracing-subscriber", "dep:tracing-log"]
|
|
trace = ["tracing", "tracing-error"]
|
|
trace_tracy_memory = ["tracing", "dep:tracy-client"]
|
|
tracing-chrome = ["tracing", "dep:tracing-chrome"]
|
|
tracing-error = ["tracing", "dep:tracing-error"]
|
|
tracing-tracy = ["tracing", "dep:tracing-tracy"]
|
|
|
|
# Allows access to the `std` crate. Enabling this feature will prevent compilation
|
|
# on `no_std` targets, but provides access to certain additional features on
|
|
# supported platforms.
|
|
std = ["bevy_app/std", "bevy_utils/std", "bevy_ecs/std"]
|
|
|
|
# Enables use of browser APIs.
|
|
# Note this is currently only applicable on `wasm32` architectures.
|
|
web = ["bevy_app/web", "dep:tracing-wasm"]
|
|
|
|
[dependencies]
|
|
# bevy
|
|
bevy_app = { path = "../bevy_app", version = "0.16.0-dev", default-features = false }
|
|
bevy_utils = { path = "../bevy_utils", version = "0.16.0-dev", default-features = false, features = [
|
|
"alloc",
|
|
] }
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.16.0-dev", default-features = false }
|
|
|
|
# other
|
|
log = { version = "0.4", default-features = false }
|
|
tracing-subscriber = { version = "0.3.1", optional = true, features = [
|
|
"registry",
|
|
"env-filter",
|
|
] }
|
|
tracing-chrome = { version = "0.7.0", optional = true }
|
|
tracing-log = { version = "0.2.0", optional = true }
|
|
tracing-error = { version = "0.2.0", optional = true }
|
|
tracing = { version = "0.1", default-features = false, optional = true, features = [
|
|
"std",
|
|
] }
|
|
|
|
# Tracy dependency compatibility table:
|
|
# https://github.com/nagisa/rust_tracy_client
|
|
tracing-tracy = { version = "0.11.4", optional = true }
|
|
tracy-client = { version = "0.18.0", optional = true }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_log-sys = "0.3.0"
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
tracing-wasm = { version = "0.2.1", optional = true }
|
|
|
|
[target.'cfg(target_os = "ios")'.dependencies]
|
|
tracing-oslog = "0.2"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
|
|
all-features = true
|