MyLocation icon indicating copy to clipboard operation
MyLocation copied to clipboard

Add logging

Open gdt opened this issue 3 years ago • 2 comments
trafficstars

When using this as a debug tool, the dynamic behavior from startup is very interesting. For example I think I saw DejaVu first report cell-based location and then after wifi scan completed a better location.

Inspired by GPSTest, it would be nice to have a persistent setting for logs, and if set, then on each invocation a log file would be written to Downloads/MyLocation/yyyymmddThhmmss.json (UTC!) or something like that, and have records perhaps (in json but logically like): time=t event=start time=t event=location provider=foo lat=x lon=y hae=z accuracy=w time=t event=disable provider=gps time=t event=end

with the hope that some scripts in contrib could process this, but even humans reading it would be very useful.

gdt avatar Dec 28 '21 17:12 gdt

a log file would be written to

A user-configurable directory, preferably.

JSON

Surely CSV would be a sensible format for such (rapid) logging of what may end up being a large amount of data.

yyyymmddThhmmss.json (UTC!)

Then you mean “YYYY(-)MM(-)DDTHHMMSSZ” (ISO 8601).

Lee-Carre avatar Jan 08 '22 15:01 Lee-Carre

Sure, csv is fine too. I meant not a giant json object but 1 object per line, only because there are different types of events. Anything that's easy to parse is fine.

gdt avatar Jan 08 '22 15:01 gdt