bevy/crates/bevy_log/Cargo.toml

48 lines
1.3 KiB
TOML
Raw Normal View History

2020-11-13 01:23:57 +00:00
[package]
name = "bevy_log"
version = "0.15.0-dev"
edition = "2021"
2020-11-13 01:23:57 +00:00
description = "Provides logging for Bevy Engine"
homepage = "https://bevyengine.org"
repository = "https://github.com/bevyengine/bevy"
Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) This relicenses Bevy under the dual MIT or Apache-2.0 license. For rationale, see #2373. * Changes the LICENSE file to describe the dual license. Moved the MIT license to docs/LICENSE-MIT. Added the Apache-2.0 license to docs/LICENSE-APACHE. I opted for this approach over dumping both license files at the root (the more common approach) for a number of reasons: * Github links to the "first" license file (LICENSE-APACHE) in its license links (you can see this in the wgpu and rust-analyzer repos). People clicking these links might erroneously think that the apache license is the only option. Rust and Amethyst both use COPYRIGHT or COPYING files to solve this problem, but this creates more file noise (if you do everything at the root) and the naming feels way less intuitive. * People have a reflex to look for a LICENSE file. By providing a single license file at the root, we make it easy for them to understand our licensing approach. * I like keeping the root clean and noise free * There is precedent for putting the apache and mit license text in sub folders (amethyst) * Removed the `Copyright (c) 2020 Carter Anderson` copyright notice from the MIT license. I don't care about this attribution, it might make license compliance more difficult in some cases, and it didn't properly attribute other contributors. We shoudn't replace it with something like "Copyright (c) 2021 Bevy Contributors" because "Bevy Contributors" is not a legal entity. Instead, we just won't include the copyright line (which has precedent ... Rust also uses this approach). * Updates crates to use the new "MIT OR Apache-2.0" license value * Removes the old legion-transform license file from bevy_transform. bevy_transform has been its own, fully custom implementation for a long time and that license no longer applies. * Added a License section to the main readme * Updated our Bevy Plugin licensing guidelines. As a follow-up we should update the website to properly describe the new license. Closes #2373
2021-07-23 21:11:51 +00:00
license = "MIT OR Apache-2.0"
2020-11-13 01:23:57 +00:00
keywords = ["bevy"]
log spans on panic when trace is enabled (#3848) # Objective - Help debug panics ## Solution - Insert a custom panic hook when trace is enabled that will log spans example when running a command on a despawned entity before: ``` thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` after: ``` 0: bevy_ecs::schedule::stage::system_commands with name="panic::my_bad_system" at crates/bevy_ecs/src/schedule/stage.rs:871 1: bevy_ecs::schedule::stage with name=Update at crates/bevy_ecs/src/schedule/mod.rs:340 2: bevy_app::app::frame at crates/bevy_app/src/app.rs:111 3: bevy_app::app::bevy_app at crates/bevy_app/src/app.rs:126 thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2022-02-28 22:27:20 +00:00
[features]
trace = ["tracing-error"]
trace_tracy_memory = ["dep:tracy-client"]
log spans on panic when trace is enabled (#3848) # Objective - Help debug panics ## Solution - Insert a custom panic hook when trace is enabled that will log spans example when running a command on a despawned entity before: ``` thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` after: ``` 0: bevy_ecs::schedule::stage::system_commands with name="panic::my_bad_system" at crates/bevy_ecs/src/schedule/stage.rs:871 1: bevy_ecs::schedule::stage with name=Update at crates/bevy_ecs/src/schedule/mod.rs:340 2: bevy_app::app::frame at crates/bevy_app/src/app.rs:111 3: bevy_app::app::bevy_app at crates/bevy_app/src/app.rs:126 thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2022-02-28 22:27:20 +00:00
2020-11-13 01:23:57 +00:00
[dependencies]
bevy_app = { path = "../bevy_app", version = "0.15.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" }
bevy_ecs = { path = "../bevy_ecs", version = "0.15.0-dev" }
2020-11-13 01:23:57 +00:00
tracing-subscriber = { version = "0.3.1", features = [
"registry",
"env-filter",
] }
Update tracing-chrome requirement from 0.6.0 to 0.7.0 (#6709) Updates the requirements on [tracing-chrome](https://github.com/thoren-d/tracing-chrome) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/thoren-d/tracing-chrome/releases">tracing-chrome's releases</a>.</em></p> <blockquote> <h2>Release v0.7.0</h2> <ul> <li>Add <code>start_new</code> to <code>FlushGuard</code>. You can now generate multiple traces in one run!</li> <li>Clean up dependencies</li> <li>Make events thread-scoped</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/8760d81206ba43a16484b1c5f458290a9a6c9a4c"><code>8760d81</code></a> Prepare for 0.7 (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/16">#16</a>)</li> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/a30bfb78d2010c7ef1e9f519e6dc567a731c8021"><code>a30bfb7</code></a> Update documentation (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/15">#15</a>)</li> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/3fe24ff44de9d0d0bf585d5582d6ca9b14800e2d"><code>3fe24ff</code></a> Save thread names for start_new (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/14">#14</a>)</li> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/fa8a0ff8bac7dce14baf1df01092cf3bf883c5cc"><code>fa8a0ff</code></a> Adding &quot;Start New&quot; feature that allows a user to finalize writing to the (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/11">#11</a>)</li> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/d3059d66b356b113246f7dad012509bb9e96c380"><code>d3059d6</code></a> Directly depend on crossbeam_channel (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/12">#12</a>)</li> <li><a href="https://github.com/thoren-d/tracing-chrome/commit/441dba5c212f2ae91d4ffc8ba45ccdfa5f2e9b37"><code>441dba5</code></a> change scope of instant events to thread (<a href="https://github-redirect.dependabot.com/thoren-d/tracing-chrome/issues/13">#13</a>)</li> <li>See full diff in <a href="https://github.com/thoren-d/tracing-chrome/compare/v0.6.0...v0.7.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
2022-12-04 22:30:09 +00:00
tracing-chrome = { version = "0.7.0", optional = true }
Update tracing-log requirement from 0.1.2 to 0.2.0 (#10404) Updates the requirements on [tracing-log](https://github.com/tokio-rs/tracing) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing/releases">tracing-log's releases</a>.</em></p> <blockquote> <h2>tracing-log 0.2.0</h2> <p>This release contains two breaking changes: the removal of the <code>env_logger</code> and <code>trace_logger</code> features. Below are the suggested migration paths:</p> <ul> <li><code>env_logger</code>: users should use [<code>tracing_subscriber::fmt::Subscriber</code>] or [<code>tracing_subscriber::fmt::Layer</code>] with the [<code>Targets</code>] or [<code>EnvFilter</code>] filters instead.</li> <li><code>trace_logger</code>: users should use the <code>tracing</code> crate's [&quot;log&quot; feature flag][log-feature] instead.</li> </ul> <h3>Breaking Changes</h3> <ul> <li>Remove deprecated <code>env_logger</code> feature. This removes the dependency on the unmaintained <code>atty</code> crate, resolving the security advisory [GHSA-g98v-hv3f-hcfr]/[RUSTSEC-2021-0145]. (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2771">#2771</a>)</li> <li>Remove deprecated <code>trace_logger</code> feature. (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2771">#2771</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/2771">#2771</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/2771">tokio-rs/tracing#2771</a> [<code>tracing_subscriber::fmt::Subscriber</code>]: <a href="https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Subscriber.html">https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Subscriber.html</a> [<code>tracing_subscriber::fmt::Layer</code>]: <a href="https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Layer.html">https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Layer.html</a> [<code>Targets</code>]: <a href="https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/targets/struct.Targets.html">https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/targets/struct.Targets.html</a> [<code>EnvFilter</code>]: <a href="https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/struct.EnvFilter.html">https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/struct.EnvFilter.html</a> [log-feature]: <a href="https://docs.rs/tracing/latest/tracing/#emitting-log-records">https://docs.rs/tracing/latest/tracing/#emitting-log-records</a> [GHSA-g98v-hv3f-hcfr]: <a href="https://github.com/advisories/GHSA-g98v-hv3f-hcfr">https://github.com/advisories/GHSA-g98v-hv3f-hcfr</a> [RUSTSEC-2021-0145]: <a href="https://rustsec.org/advisories/RUSTSEC-2021-0145.html">https://rustsec.org/advisories/RUSTSEC-2021-0145.html</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/tracing/commit/4161d8137d4f6117f17b110b0ec022d9350bf8e6"><code>4161d81</code></a> chore: prepare tracing-log 0.2.0 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2772">#2772</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/1c802c77639478eb1ddba6d2c28019da919a43cb"><code>1c802c7</code></a> log: remove deprecated <code>env_logger</code> and <code>trace_logger</code> APIs (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2771">#2771</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/4965c3657010e93c6d5f3e706a896b67f2f13f3d"><code>4965c36</code></a> chore: Prepare tracing-log 0.1.4 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2770">#2770</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/15600a3a67c418f53cb80ff21da57d89a5de0486"><code>15600a3</code></a> tracing: prepare to release v0.1.40</li> <li><a href="https://github.com/tokio-rs/tracing/commit/20a1762b3fd5f1fafead198fd18e469c68683721"><code>20a1762</code></a> tracing: use ManuallyDrop instead of mem::forget (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2765">#2765</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/4b99457c876d7a9d1865b4d3f5cefb87cd522750"><code>4b99457</code></a> chore: prepare tracing 0.1.39 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2755">#2755</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/b2a5e11e242e53e96adec1023687760140f7e65c"><code>b2a5e11</code></a> tracing: update core to v0.1.31 and attributes to v0.1.27</li> <li><a href="https://github.com/tokio-rs/tracing/commit/3825a50c1afbbbebf4339c947f489b0f923dd450"><code>3825a50</code></a> tracing: use full path when calling <code>format_args!</code> (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2757">#2757</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/c4b2a56937dd40aaa2e2991636eca6748353201f"><code>c4b2a56</code></a> chore: prepare tracing-core 0.1.32 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2754">#2754</a>)</li> <li><a href="https://github.com/tokio-rs/tracing/commit/2502f19d934b092fc01bb7493eacbb16b4038bf3"><code>2502f19</code></a> chore: prepare tracing-attributes 0.1.27 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2756">#2756</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/tracing/compare/tracing-log-0.1.2...tracing-log-0.2.0">compare view</a></li> </ul> </details> <br /> You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: James Liu <contact@jamessliu.com>
2024-02-27 03:25:42 +00:00
tracing-log = "0.2.0"
log spans on panic when trace is enabled (#3848) # Objective - Help debug panics ## Solution - Insert a custom panic hook when trace is enabled that will log spans example when running a command on a despawned entity before: ``` thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` after: ``` 0: bevy_ecs::schedule::stage::system_commands with name="panic::my_bad_system" at crates/bevy_ecs/src/schedule/stage.rs:871 1: bevy_ecs::schedule::stage with name=Update at crates/bevy_ecs/src/schedule/mod.rs:340 2: bevy_app::app::frame at crates/bevy_app/src/app.rs:111 3: bevy_app::app::bevy_app at crates/bevy_app/src/app.rs:126 thread 'main' panicked at 'Could not add a component (of type `panic::Marker`) to entity 1v0 because it doesn't exist in this World. If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage. This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers', /bevy/crates/bevy_ecs/src/system/commands/mod.rs:664:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
2022-02-28 22:27:20 +00:00
tracing-error = { version = "0.2.0", optional = true }
# Tracy dependency compatibility table:
# https://github.com/nagisa/rust_tracy_client
tracing-tracy = { version = "0.11.0", optional = true }
tracy-client = { version = "0.17.0", optional = true }
2020-11-13 01:23:57 +00:00
[target.'cfg(target_os = "android")'.dependencies]
Update android_log-sys requirement from 0.2.0 to 0.3.0 (#7925) Updates the requirements on [android_log-sys](https://github.com/nercury/android_log-sys-rs) to permit the latest version. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/nercury/android_log-sys-rs/commits">compare view</a></li> </ul> </details> <br /> You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 07:55:33 +00:00
android_log-sys = "0.3.0"
2020-11-13 01:23:57 +00:00
[target.'cfg(target_arch = "wasm32")'.dependencies]
tracing-wasm = "0.2.1"
Use oslog for ios (#13364) # Objective On mobile devices, it's best to use the OS's native logging due to the difficulty of accessing the console. This is already done for Android. This is an updated version of https://github.com/bevyengine/bevy/pull/4462. ## Solution This PR uses Absolucy's [tracing-oslog](https://github.com/Absolucy/tracing-oslog) ([ZLib license](https://github.com/Absolucy/tracing-oslog/blob/main/LICENSE.md)) for iOS in order to use Apple's `os_log`. ## Testing I ran `examples/mobile` with the logging from `examples/app/logs.rs` on an iOS device, I then checked the logs could be filtered in the MacOS Console.app. ## Changelog - Change bevy_log to use Apple's os_log on iOS. ## Questions for Reviewers It's worth noting that the dependency this adds hasn't had bug fixes released in a few years, so we may want to consider one or more of: 1. a feature flag to opt-in, and it would also allow `os_log` on MacOS 2. merge as-is and have some (minor?) upstream bugs 3. hold off on this PR until a suitable alternative dependency arises 4. maintain our own implementation ## Future work In a follow-up PR it might be good to make the `subsystem` field have a better default value, like [this one](https://github.com/bevyengine/bevy/blob/main/examples/mobile/bevy_mobile_example.xcodeproj/project.pbxproj#L363). That value can be retrieved programmatically if we bind another system API (For posterity in Swift this is `Bundle.main.bundleIdentifier`, but the C/ObjC equivalent is likely easier to bind). This would almost always be the correct value, while the current default is unlikely to ever be correct. --------- Co-authored-by: Dusty DeWeese <dustin.deweese@gmail.com> Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Carter Anderson <mcanders1@gmail.com> Co-authored-by: François Mockers <francois.mockers@vleue.com>
2024-10-11 08:58:14 +00:00
[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