Is it possible to log the user which is responsible for generating and executing each SQL query? I am logging the query already, but I am not sure how to get the logged in user's name. Ideally, I would have something like this:
I'm not sure if that is possible or where it should go. The SQL is being logged in application/Espo/ORM/DB/Query/Base.php; is that still the right place to do this?
Code:
$GLOBALS['log']->debug('User: $user, SQL: $sql');
Comment