spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

use `tracing` for logging/tracing

Open mainrs opened this issue 5 years ago • 1 comments

It is quite hard right now to actually follow along inside of logs and see what is going on when bugs occur. Maybe a more sophisticated solution might be worth looking into. I currently use tracing inside a hobby project and I really like it thus far. A simple function attribute and it traces all method calls by itself.

#[tracing::instrument]
fn name() {}

tracing does support a lot of "plugins" (measuring execution times, interop with log, ...).

However, the best selling point is the async support it does have. It makes it really easy to handle a multi-threaded environment.

This opportunity could be used to enable more user-friendly logging messages as well as adding more technical data that makes it easier to debug later on.

On that note, user-sensible data can also be filtered out properly when this is being pursued.

mainrs avatar Jul 11 '20 08:07 mainrs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 13 '21 15:01 stale[bot]