prs on Nostr: add relay logging (#1263) This PR adds relay logging to the RelayDetailView. ...
add relay logging (#1263)
This PR adds relay logging to the RelayDetailView.
Features:
* list of events, most recent at the top
* shows changes to RelayConnection's state
* shows changes to network state
* RelayDetailView updates live as lines are added to the log
* logs persisted to disk for later investigation
* line limit prevents unbounded file growth
Here's how it looks when resuming after having the app in the background for a while and the relays need to reconnect:
![relay-log](
https://github.com/damus-io/damus/assets/445882/fd788aae-ed44-49c5-9dd1-4e6c7398456e)
relays, 5 commits
https://github.com/damus-io/damus/pull/1263Published at
2023-06-08 12:09:51Event JSON
{
"id": "dee0b78706bc1cd076939d55e2f16283b174582b3083cecdb13e154348e56a30",
"pubkey": "edf16b1dd61eab353a83af470cc13557029bff6827b4cb9b7fc9bdb632a2b8e6",
"created_at": 1686226191,
"kind": 1,
"tags": [
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
],
[
"t",
"damuspr"
]
],
"content": "add relay logging (#1263)\n\nThis PR adds relay logging to the RelayDetailView.\r\n\r\nFeatures:\r\n* list of events, most recent at the top\r\n* shows changes to RelayConnection's state\r\n* shows changes to network state\r\n* RelayDetailView updates live as lines are added to the log\r\n* logs persisted to disk for later investigation\r\n* line limit prevents unbounded file growth\r\n\r\n\r\nHere's how it looks when resuming after having the app in the background for a while and the relays need to reconnect: \r\n\r\n![relay-log](https://github.com/damus-io/damus/assets/445882/fd788aae-ed44-49c5-9dd1-4e6c7398456e)\r\n\n\nrelays, 5 commits\n\nhttps://github.com/damus-io/damus/pull/1263",
"sig": "0fce8cfbf6ee9dfb37b2783816a480a33fd0e8d664472602354a8d8d587f7fb664c58dc548d960f813d01c892bb73f3fa0da299c7cfbe6b1a39fcd45dbd9aabd"
}