Store logs across Connector app restarts-after-crashes
Currently, the "Export logs" button in the Connector app only exports the logs collected from this application execution.
As the Connector app (in Release mode) automatically restarts itself in case of a fatal error, the logs containing the crash reason are effectively lost.
We should probably store the logs in a storage before restarting the app.
The only currently possible workaround for losing the logs is to open the DevTools console for the Connector app's background page, and execute the following line of code:
GSC.Logging.getLogger('').setLevel(goog.log.Level.FINE);
This workaround effectively disables the restart-on-crash behavior, and allows to preserve and export the logs that were collected before the crash happened.
We might want to make progress on this one, since we're getting a user report about this repeated crash, for which we don't have specific repro steps.
As a quick update, the improvement made in #156 reduces the severity of this issue: we now stop self-reloading in case we detect crash loops, which means that we do retain logs from the last crash.
This is superseded by an alternative approach: Smart Card Connector now uses the (new) chrome.systemLog API in order to append its logs to the system's log. That way, the Connector's logs stop being lost whenever it restarts.