Reputation: 117
I need to log errors, access attempts, etc, to file by creating a plugin or adding in application.ini, in the error staying default to not show to final users
thanks in advance.
Upvotes: 0
Views: 3412
Reputation: 6431
This is exactly what Zend_Log was created for.
https://docs.zendframework.com/zend-log/intro/
$writer = new Zend_Log_Writer_Stream('/path/to/logfile');
$logger = new Zend_Log($writer);
$logger->info('Informational message');
$logger->warn('Warning message');
Upvotes: 4