...
editor_Models_Logger_Task extending ZfExtended_Models_Entity_Abstract and editor_Models_Db_Logger_Task extending Zend_Db_Table_Abstract are used to save to and load from the task log table.
Configuration of LogWriters
The configuraton of log writers can be either done in the application.ini / installation.ini or hardcoded in PHP.
Code Block |
---|
title | Current writer configuration in application.ini |
---|
linenumbers | true |
---|
|
resources.ZfExtended_Resource_Logger.writer.default.type = 'ErrorLog'
resources.ZfExtended_Resource_Logger.writer.default.level = 4 ; → warn logs only till warning
; Test config:
resources.ZfExtended_Resource_Logger.writer.mail.type = 'DirectMail'
; via the formatter define what the user gets: full debug content, or only notice and so on.
resources.ZfExtended_Resource_Logger.writer.mail.level = 2 ; → warn logs only till error
resources.ZfExtended_Resource_Logger.writer.mail.receiver[] = 'thomas@mittagqi.com'
resources.ZfExtended_Resource_Logger.writer.mail.receiver[] = 'test@mittagqi.com'
resources.ZfExtended_Resource_Logger.writer.mail.type = 'Database'
; via the formatter define what the user gets: full debug content, or only notice and so on.
resources.ZfExtended_Resource_Logger.writer.mail.level = 16 ; → warn logs only till error |
Code Block |
---|
title | task log writer config in application/modules/editor/configs/module.ini |
---|
|
resources.ZfExtended_Resource_Logger.writer.tasklog.type = 'editor_Logger_TaskWriter'
resources.ZfExtended_Resource_Logger.writer.tasklog.level = 4 ; → warn logs only till warning
;
; The TaskWriter is a editor specific writer, it logs only events containing information about a task. The events are logged in a dedicated table, accessable via the frontend. Only warnings or events more severe as warnings are written to the task log. So no notices about tasks are additionally logged.
; |
Code Block |
---|
language | php |
---|
title | In PHP just add new writters to the wanted logger instance |
---|
|
// use the default logger instance:
$logger = Zend_Registry::get('logger');
$logger->addWriter('name', $writerInstance); |
Exceptions
In translate5 to less exceptions were used till now. Mostly just a ZfExtended_Exception was used.
...