probe-android icon indicating copy to clipboard operation
probe-android copied to clipboard

Make it obvious to see all the logs

Open aanorbel opened this issue 2 years ago • 5 comments

Fixes https://github.com/ooni/probe/issues/1777

Proposed Changes

  • Include log file appender
  • Fetch and display logs to UI.
  • Add log file sharing.
. . . .
Screenshot_20220824_185707 Screenshot_20220824_185741 Screenshot_20220824_185812 Screenshot_20220824_185851

aanorbel avatar Jun 01 '22 06:06 aanorbel

This is fantastic! Thank you! I will review ASAP!

bassosimone avatar Jun 01 '22 06:06 bassosimone

See also: https://github.com/ooni/probe/issues/1992

bassosimone avatar Jun 07 '22 17:06 bassosimone

Feature request: possibility of sharing the logs with OONI developers! (We're starting to test this!)

I have updated the user story accordingly: https://github.com/ooni/probe/issues/1777.

bassosimone avatar Jun 09 '22 21:06 bassosimone

We discussed today with @aanorbel that we'll implement sharing of the whole logfile via Telegram, etc.

bassosimone avatar Jun 24 '22 14:06 bassosimone

I have used and testing this functionality a bit. Here's some extra feedback:

  • [ ] I see some utility in sharing logs as HTML, but I would rather share them as a text file without tags because I think ultimately the presence of tags would only make log processing more complex on our end

  • [x] the "advanced" menu entry now seems to contain two "debug logs" entries, however I think the one that leads to the logs should not be named "debug logs" but perhaps something like "see recent logs"

I tested the sharing feature and it's working as intended, thank you!

bassosimone avatar Sep 21 '22 10:09 bassosimone

I am using the diff and I am happy with it. However, I think it would be better if we only selected the "LOG" events and just emitted their severity and content. Currently we're emitting all MK events, which I think only adds confusion.

bassosimone avatar Feb 16 '23 15:02 bassosimone

We can always change the type of events we log. Establishing the necessary framework for logging and sharing logs was top priority. I would be removing logs for MK_EVENTS.

aanorbel avatar Feb 20 '23 09:02 aanorbel

We can always change the type of events we log. Establishing the necessary framework for logging and sharing logs was top priority. I would be removing logs for MK_EVENTS.

What I suggest is to only log the MK_EVENTS that contain log messages. You can identify them by their key which is log. There should be a place in the codebase where we already trap this event for logging. That should suffice.

Thank you! 🙌

bassosimone avatar Feb 20 '23 13:02 bassosimone