Anonymized logs
It would be helpful for user to have some place in the UI to get anonymized Kresus logs that they could easily copy/paste to a public discussion without fearing to reveal any sensitive data.
Problem is that Kresus basically just logs to stdout
and relies on third-party software (docker / systemd etc) to store and handle the logs.
Replacing sensitive data is as easy as matching logs with a given regex
, but getting back the logs from the Kresus app is quite difficult.
@bnjbvr was proposing on IRC to always dump anonymized logs in a Kresus log folder, as well as outputting complete logs to stdout
to pass to some third party software. That would do the trick but requires to log twice more data, and leaves part of the log-related issues (typically log rotation) to us.
I know there are Python wrappers for systemd, there might be an equivalent library for Node. An alternative approach would be to have Kresus query the logs from the underlying log management system (typically systemd
's journalctl
) and filter them before printing them to the user, from the UI. The flow I have in mind would be to have some dedicated tab in the settings (for instance) "Export publicly sharable logs". Then, there would be a switch between various logs management services (systemd
, docker
etc) and the user would export the logs.
In the case where Kresus is embedded in another platform (for instance Cozy or YunoHost), there could be an environment variable set to enforce the place to fetch logs from and bypass this selection step.