Using: EspoCRM Version 6.1.7
I created a hook as follows:
The config file is set as follows:
I see debug statements in the log file from the application, but nothing from the hook appears in the log file. The "error" statements appears in the GUI when I try to save a new TimesheetData entity, which means the hook is being called as expected. I've tried debug, notice, info, and error; nothing has worked.
I ran 'chown -R www-data:www-data custom/' to set every file to have the same permissions as the webserver user. Unfortunately, that didn't work either.
Why are the log statements not appearing in the log file?
I created a hook as follows:
Code:
1 <?php 2 3 namespace Espo\Custom\Hooks\TimesheetData; 4 5 use \Espo\Core\Exceptions\Error; 6 use Espo\ORM\Entity; 7 8 class SaveTimesheetData extends \Espo\Core\Hooks\Base 9 { 10 public function beforeSave(Entity $en, array $options = array()) { 11 12 $GLOBALS['log']->debug('Got here'); 13 throw new Error("error"); 14
Code:
41 'logger' => [ 42 'path' => 'data/logs/espo.log', 43 'level' => 'DEBUG', 44 'rotation' => true, 45 'maxFileNumber' => 30 46 ],
I ran 'chown -R www-data:www-data custom/' to set every file to have the same permissions as the webserver user. Unfortunately, that didn't work either.
Why are the log statements not appearing in the log file?
Comment