cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.06k stars 365 forks source link

How are Logs going to be used? #82

Closed bradanlane closed 8 years ago

bradanlane commented 9 years ago

The last tab in the WebUI with nothing yet created is the Logs tab.

How do we see logs being used and what would be most useful to enable for users to assist with that use?

cyoung commented 9 years ago

Well, the only human readable data really is in stratux.log. And people will mostly be looking for errors there. So maybe some highlighting for error log entries. Then we can do the same (in the future) for the system logs based on some string matches or regex for common system errors.

eolinger commented 9 years ago

Maybe this is obvious but a user friendly way to download the logs in order to submit them with bug reports (possibly even zip them for download).

Size and last update time would be good, along with a way to truncate them for space.

bradanlane commented 9 years ago

OK. I just ran a few tests. If we want to have some form of "submit logs", it is possible to collect the necessary log data; gzip it; base64 encode it; send it using a mailto link that uses the device native mail client. It get's queued and will send once the user gets network connectivity.

It does launch the mail client so the user sees it is going out as mail. They also have the option to add any text they want to the head of the email.

I generated the correct href for the link with a target email address, subject line, and the base64 text block as the body of the message.

If (and I emphasize 'if') we want this ability, we would want to manage the size of the content. I did my test with 115K log file and ended up with a 15K base64 encoded block of text. We would also need an address to mail these to.

cyoung commented 9 years ago

logs@stratux.me

It's just forwarding to me for now, will set up a mailbox and something to parse received logs when it gets to a certain level.

bradanlane commented 9 years ago

OK, I'll code this up. Thanks.

ssokol commented 9 years ago

Just a random thought: the primary log for realtime debugging is stratux.log. It would be great if the data being written to the log file could also be subscribed to over the websocket and displayed in the logging tab. It would avoid the need to SSH in and tail the actual file. Not sure how hard that is to do in go.

cyoung commented 8 years ago

@bradanlane - how'd that log sender thing work out? Or did you decide against it?

cyoung commented 8 years ago

Duplicate #228.