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

Console Log in UI #90

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

SergioRibera
Copy link

Features:

  • Easy API to use console log, just need use log crate
  • API to make custom filters by module
  • UI implementation
  • Examples implementations

Screenshot
Screenshot_20231110_215847

@SergioRibera
Copy link
Author

@jakobhellermann any update(?

@jakobhellermann
Copy link
Owner

Thanks for the ping, I forgot about the PR. The UI looks good to me and it would be very cool to have this as a feature. I have just one question. Would it be possible to hook into tracing instead of log for the log viewer? Bevy uses tracing internally and I think it would be better to work directly with that.

@SergioRibera
Copy link
Author

Thanks for the ping, I forgot about the PR. The UI looks good to me and it would be very cool to have this as a feature. I have just one question. Would it be possible to hook into tracing instead of log for the log viewer? Bevy uses tracing internally and I think it would be better to work directly with that.

that's an excellent suggestion, let me see how I could do it, at the moment I don't think it's possible since I implement a custom logger precisely for the management of these, so let me take a look at it and I'll come back.

@SergioRibera
Copy link
Author

I have been checking and it is not possible, internally bevy does things that do not give me the control I need to replace the main logger 😞

@jakobhellermann
Copy link
Owner

https://discord.com/channels/691052431525675048/692648638823923732/1177575500818944032 looks like someone got tracing messages into egui to work

@peanutbother
Copy link

peanutbother commented Aug 1, 2024

I have been checking and it is not possible, internally bevy does things that do not give me the control I need to replace the main logger 😞

@doonv got it working with their bevy_dev_console crate.
I'm using it with my own fork to use some parts of it: https://github.com/peanutbother/bevy_dev_console/tree/public-interface

maybe we could combine the two as I love the idea of not only a log view but also being able to parse expressions and run custom commands from the console

@ActuallyHappening
Copy link
Contributor

The tracing logging would be nice
but also, I just look at logs in my actual console anyway

@doonv
Copy link

doonv commented Nov 25, 2024

maybe we could combine the two as I love the idea of not only a log view but also being able to parse expressions and run custom commands from the console

You can already render bevy_dev_console in any egui context (see https://github.com/doonv/bevy_dev_console/blob/98355f16b7d83ad0db983f2204426079780aa2ae/src/ui.rs#L106) so it shouldn't be that hard to implement it as a widget in bevy_editor_pls. (note: i don't know know how bevy_editor_pls works)

@SergioRibera
Copy link
Author

SergioRibera commented Nov 25, 2024

You can already render bevy_dev_console in any egui context (see doonv/bevy_dev_console@98355f1/src/ui.rs#L106) so it shouldn't be that hard to implement it as a widget in bevy_editor_pls.

They are similar but not the same, in this PR I was wanting to make an integration similar to the one Unity has for debugging messages, yours is an interaction with a shell I think, you would have to change a little the UI of your project if you want to keep the essence of this PR

(note: i don't know know how bevy_editor_pls works)

You can see how I did this PR, it's not that complicated or at least that I remember.

Note

By the way: I'm sorry I missed the PR, at the time I was trying to integrate tracing and it is more complicated than log, maybe I could resume the PR now or if someone wants to collaborate, I am totally open to it.

@doonv
Copy link

doonv commented Nov 25, 2024

They are similar but not the same, in this PR I was wanting to make an integration similar to the one Unity has for debugging messages, yours is an interaction with a shell I think, you would have to change a little the UI of your project if you want to keep the essence of this PR

The only major differences between my console and Unity's console from I can see is that Unity has filtering and search for log messages, and my console has command parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants