Well at least kodi logs are retained after reboot so that can already be used to analyse. Alternatively enable persistent system logs Check this post