This is a very cool solution!<p>Unfortunately, it does not log the output of the command. For those that need to log absolutely everything, check out:<p><a href="https://github.com/jpschewe/rootsh" rel="nofollow">https://github.com/jpschewe/rootsh</a><p>rootsh is a wrapper shell for bash and logs everything.