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

Logging #176

Closed
ghost opened this issue Jun 22, 2020 · 7 comments
Closed

Logging #176

ghost opened this issue Jun 22, 2020 · 7 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jun 22, 2020

We should have some traces in the reactor or executor

@ghost ghost modified the milestones: multitask, async-io Jun 22, 2020
@ghost
Copy link
Author

ghost commented Jun 22, 2020

It would be really cool if the executor timed futures and logged a warning when they take an unusually long time.

@ghost
Copy link
Author

ghost commented Jul 14, 2020

I want to add some logging to both reactor and executor but need concrete suggestions:

  • What in particular would you like to see logged?
  • What logging format should be used? How do we display a text message and then some additional info?

@zicklag
Copy link

zicklag commented Jul 14, 2020

What logging format should be used?

Wouldn't logging output and formatting be handled by the application through something like tracing_subscriber or log? That would probably be preferred over having smol log directly. There are too many different format's and places you might want to log to ( syslog, stdout/stderror, etc. ).

How do we display a text message and then some additional info?

The tracing crate allows you to specify a message and extra fields, but again, I think the display should probably be left up to the user.


What in particular would you like to see logged?

I'm not completely sure, especially because I don't know what smol does under the hood that I might need to know about. :)

It would be great to have warnings for common mistakes or other things that might seem amiss if there are ways to misuse smol or other things that smol might be able to notice like detecting when to turn up the thread count or something ( I don't know just throwing it out there ).

If I were a smol developer I might want some trace logs that print out low-level events that could be useful for debugging.

@awaited-hare
Copy link

awaited-hare commented Jul 24, 2020

@joshtriplett
Copy link
Contributor

rustc is using tracing these days, and as a result, tracing has gone through many optimizations. It seems like a good default.

@notgull
Copy link
Member

notgull commented Apr 1, 2023

I'd like to use tracing, but it's currently blocked until we bump our MSRV. See #244.

@notgull
Copy link
Member

notgull commented Jun 9, 2024

tracing is now used pretty much everywhere it matters. Closing now.

@notgull notgull closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants