Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging variants of system chaining / piping adaptors #6224

Closed
alice-i-cecile opened this issue Oct 10, 2022 · 5 comments
Closed

Add logging variants of system chaining / piping adaptors #6224

alice-i-cecile opened this issue Oct 10, 2022 · 5 comments
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

What problem does this solve or what need does it fill?

When using system chaining (soon to be system piping), I often want to simply log the error using tracing's macros.

What solution would you like?

Add dbg, info, warn and error system adaptor variants to expand #5776, which call the corresponding re-exported bevy_log macros when the result is an error.

What alternative(s) have you considered?

Write these adaptors myself in each code base I use. IMO these are simple, natural, and should be made ergonomic.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Oct 10, 2022
@Edwox
Copy link
Contributor

Edwox commented Oct 12, 2022

Hi! I'd like to try and resolve this issue.

@alice-i-cecile
Copy link
Member Author

Awesome, that would be great :)

@Edwox
Copy link
Contributor

Edwox commented Nov 2, 2022

I attempted to locate the crates/bevy_ecs/src/system/system_chaining.rs file, but it does not seem to exist in main.
Am I missing something?

@alice-i-cecile
Copy link
Member Author

It got moved to system_piping :)

@Edwox
Copy link
Contributor

Edwox commented Nov 2, 2022

Okay, great. Thank you!

@bors bors bot closed this as completed in aea4c5b Dec 11, 2022
alradish pushed a commit to alradish/bevy that referenced this issue Jan 22, 2023
…gine#6751)

# Objective

Fixes bevyengine#6224, add ``dbg``, ``info``, ``warn`` and ``error`` system piping adapter variants to expand bevyengine#5776, which call the corresponding re-exported [bevy_log macros](https://docs.rs/bevy/latest/bevy/log/macro.info.html) when the result is an error.

## Solution

* Added ``dbg``, ``info``, ``warn`` and ``error`` system piping adapter variants to ``system_piping.rs``. 
* Modified and added tests for these under examples in ``system_piping.rs``.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
…gine#6751)

# Objective

Fixes bevyengine#6224, add ``dbg``, ``info``, ``warn`` and ``error`` system piping adapter variants to expand bevyengine#5776, which call the corresponding re-exported [bevy_log macros](https://docs.rs/bevy/latest/bevy/log/macro.info.html) when the result is an error.

## Solution

* Added ``dbg``, ``info``, ``warn`` and ``error`` system piping adapter variants to ``system_piping.rs``. 
* Modified and added tests for these under examples in ``system_piping.rs``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants