Out of the box Debug::log writes the date and a specified message to [root]/debug.log. I would like to add the name of the logged-in user and the filename and line number at which the log function was called.
I know how to do this by editing the function. However I want to achieve this by adding code to [my module]/code rather than changing code in sapphire.
Is there a neat way of doing this? Currently I have no idea.