Longer / persistent logs for add-ons

I’m trying to debug an error condition that occurred after a long run of the pagekite add-on i’m developing which happened a few days ago.

The log messages in the add-on details page only includes a certain length (I’d need to go further back), and appears not to persist through reboots (which, given when the plugin errs I only have limited access but can hard-reset, would be nice to have).

I’ve tried finding the logs through the ssh add-on (by grepping through the whole accessible system for log messages), but found nothing; neither does the log viewer add-on show anything relevant (not surprising, though; both run in containers independent of the add-on I’m trying to debug).

What is the, or is there a, intended way to use these logs when the last few lines do not suffice?