I need to execute some PHP code on every admin view/action. E.g
file_put_contents('somelogfile.log', 'I just executed admin action');
Where should I put this code so that it wont be swept away when I should upgrade my Joomla?
Joomla version is 3.8.6.