Viceroy icon indicating copy to clipboard operation
Viceroy copied to clipboard

Unclutter log output

Open jameysharp opened this issue 8 months ago • 0 comments

Viceroy produces quite a bit of output per request, and it's not clear to me which parts are important. It'd be nice to have a conversation about exactly what should get printed.

At the default log level, with the guest profiler enabled, I get output like this:

2023-12-07T19:34:42.284284Z  INFO Listening on http://127.0.0.1:7676
2023-12-07T19:34:50.930338Z  INFO request{id=0}: handling request GET http://127.0.0.1:7676/?n=40
2023-12-07T19:34:51.391808Z  INFO request{id=0}:
Profile written to: guest-profiles/1701977690-0.json
View this profile at https://profiler.firefox.com/.
2023-12-07T19:34:51.391825Z  INFO request{id=0}: request completed using 1.4 MB of WebAssembly heap
2023-12-07T19:34:51.391829Z  INFO request{id=0}: request completed in 461ms

If issues #77 and #78 were implemented they would add two more lines like the last two. The request statistics might be better all on a single line, perhaps?

When the user has requested guest profiling they probably care most about how to view the profile, so more thought on how to make that stand out would be great.

I'm not sure it's useful to include the date, or microsecond-resolution time, on each line. Also, maybe it would be more useful to display local time rather than UTC.

I don't really know what this should look like, but I hope these comments can be a good starting point for discussion.

jameysharp avatar Dec 09 '23 00:12 jameysharp