Probably I miss understant your issue.
You don’t talk haow you write in log table . The “log table” Is it uses Model “Log” or CakeLog class.
If we talk about CakeLog,
Will be better if you show part of bootstrap.php (CakeLog::config()) and how you write in log table.