View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006557||Taler||wallet (Android App)||public||2020-09-03 11:50||2021-08-24 16:23|
|Reporter||Florian Dold||Assigned To||grote|
|Priority||normal||Severity||tweak||Reproducibility||have not tried|
|Product Version||git (master)|
|Target Version||0.8||Fixed in Version||0.8|
|Summary||0006557: implement "log view" for notifications from wallet-core|
|Description||The wallet's notifications are likely rather useful in diagnosing problems. We should consider having a *very* simple view that allows us to view the last (~hundred?) notifications.|
Each row should be expandable to show the full JSON. Since this feature is mainly meant for diagnostics, it can be hidden either in the settings or behind the developer mode. Also, we should *not* spend any effort on semantically rendering the notifications.
The only "nicety" we might want to have is a filter based on the notification type.
|Tags||No tags attached.|
||What's the use-case envisioned for this feature? Wouldn't an adb logcat be able to achieve the same without need to modify the app?|
We won't be able to logcat into the devices where an error might occur during the first BFH demo run. These will be students' devices, not our own!
Having a way to quickly view issues would be be helpful.
||And these issues are expected to not be reproducible with a device where we can do logcat?|
||Yes! The wallet's (database) state is rather complex, and the "interesting" issues likely won't be that easy to reproduce. In most situations we wouldn't even exactly know what operation failed, so how could we reproduce it?|
||I like it. I think it should only be accessible via developer mode *or* by clicking an active error notification snack bar. So invisible to users where everything just works, but if a user gets an error, they can pull the full diagnostics out at a single click.|
||Alas, probably 0.8.1 unless Torsten is really fast ;-).|
I added a log viewer to the wallet (visible in dev mode) in 663d264. There don't seem to be any good libraries for that, so I used the most usable one. Not entirely happy with it, but instead of writing my own library, this one should give us what we need for now.
Please let me know if this works for you.
Being able to export the logs from within is definitely useful. I'm happily surprised that this is actually possible from within the Android app itself! However, after playing around with a bit, I don't think it's that helpful in diagnosing wallet issues on the spot: There are a lot of log entries, many of them not relevant to the wallet directly, and due to the limited screen space and log headers the relevant JSON is not readable at all.
In order to get more actionable information for what went wrong, what I actually wanted to see is a list view with messages (responses, errors, notifications) collected from the wallet backend. To do this, two things are required:
(1) The WalletBackendApi instance should keep the last N messages it received in a Deque (reads/writes must obtain a lock first).
(2) The UI should display a *copy* (again obtained while holding the lock) of that list in a list view (maybe with the JSON expanded/collapsed on touch as it tends to be large). It should *not* automatically update.
> There are a lot of log entries, many of them not relevant to the wallet directly
Here, I only see akono notification retry spam which I don't think has any actual purpose, so they could be removed. But there's also a filter option to find specific things.
> and due to the limited screen space and log headers the relevant JSON is not readable at all.
Yeah, I tried to shorten the strings at the beginning, but the library doesn't offer that option. It helped here to rotate the phone into landscape mode.
> In order to get more actionable information for what went wrong, what I actually wanted to see is a list view with messages (responses, errors, notifications) collected from the wallet backend.
Isn't that exactly what this already does? To cut down on spam (which I don't like either in the log), you can enter "taler-wallet-backend" in the filter field for example.
> The WalletBackendApi instance should keep the last N messages it received in a Deque (reads/writes must obtain a lock first).
I don't get why we need a separate logging infrastructure when we already have one that was made exactly for that purpose and has several readers available (in-app, command-line, Android-Studio). This is what devs are used to work with and now it can even be shared by normal users.
> It should *not* automatically update.
Yeah I don't like that part either, but there isn't an off switch. I could try to increase the sampling frequency to something really large.
Does this log facility help us to quickly see what issues the wallet is having? As far as I can see, it doesn't.
We're not building new 'logging infrastructure' here, we're just surfacing notifications from the wallet-core to the advanced users. Advanced users here are mostly people setting up their own infrastructure. Having the notifications+errors view is a cheap way to allow them to see potential errors in their setup.
||the 0.8 rc2 release comes with an improved logger, Christian please test this in landscape orientation, if it aids debugging|
||Well, of course _now_ everything works fine here ;-). Maybe call it fixed and we open a new one if we find this is inadequate?|
|2020-09-03 11:50||Florian Dold||New Issue|
|2020-09-03 11:50||Florian Dold||Status||new => assigned|
|2020-09-03 11:50||Florian Dold||Assigned To||=> grote|
|2020-09-05 13:53||Christian Grothoff||Severity||minor => tweak|
|2020-09-06 12:39||Florian Dold||Target Version||=> 0.8|
|2020-09-06 12:39||Florian Dold||Description Updated|
|2020-09-06 13:07||Florian Dold||Summary||consider "log view" for notifications from wallet-core => implement "log view" for notifications from wallet-core|
|2020-09-07 13:59||grote||Note Added: 0016899|
|2020-09-07 14:07||Florian Dold||Note Added: 0016901|
|2020-09-07 14:10||grote||Note Added: 0016902|
|2020-09-07 14:15||Florian Dold||Note Added: 0016903|
|2020-09-07 14:49||Christian Grothoff||Note Added: 0016908|
|2020-09-07 14:49||Christian Grothoff||Target Version||0.8 => 0.8.1|
|2020-09-07 14:49||Christian Grothoff||Note Added: 0016909|
|2020-09-07 19:04||grote||Note Added: 0016913|
|2020-09-08 10:56||Florian Dold||Note Added: 0016915|
|2020-09-08 13:41||grote||Note Added: 0016917|
|2020-09-08 14:27||Florian Dold||Note Added: 0016919|
|2020-09-09 19:03||grote||Note Added: 0016951|
|2020-09-09 20:58||Christian Grothoff||Note Added: 0016953|
|2020-09-24 15:08||grote||Status||assigned => resolved|
|2020-09-24 15:08||grote||Resolution||open => fixed|
|2020-10-03 12:37||Christian Grothoff||Product Version||=> git (master)|
|2020-10-03 12:37||Christian Grothoff||Fixed in Version||=> 0.8|
|2020-10-03 12:37||Christian Grothoff||Target Version||0.8.1 => 0.8|
|2021-08-24 16:23||Christian Grothoff||Status||resolved => closed|