...
System-Admins should add their custom writer configuration to the installation.ini.
Please see ErrorHandling and Application Logger for information about the log levels.
The configuration in application.ini is reserved to translate5 developers - since this file is overwritten on each update.
Code Block | ||||
---|---|---|---|---|
| ||||
resources.ZfExtended_Resource_Logger.writer.default.type = 'ErrorLog' resources.ZfExtended_Resource_Logger.writer.default.filter[] = "level <= debugwarn" ; → warn logs from fatal to debugwarn into the error log ; Test config: resources.ZfExtended_Resource_Logger.writer.mail.type = 'DirectMail' resources.ZfExtended_Resource_Logger.writer.mail.filter[] = "level <= error" ; → warn logs from fatal till error via E-Mail resources.ZfExtended_Resource_Logger.writer.mail.sender = 'sysadmin@example.com' ; → should be set with useful values in installation.ini, ; defaults to legacy value from resources.mail.defaultFrom.email resources.ZfExtended_Resource_Logger.writer.mail.receiver[] = 'sysadmin@example.com' ; → should be set with useful values in installation.ini, ; if not set defaults to legacy resources.mail.defaultFrom.email resources.ZfExtended_Resource_Logger.writer.mail.receiver[] = 'other-important-person@example.com' ; → should be set with useful values in installation.ini resources.ZfExtended_Resource_Logger.writer.database.type = 'Database' ; via the formatter define what the user gets: full debug content, or only notice and so on. resources.ZfExtended_Resource_Logger.writer.database.filter[] = "level <= debug" ; logs from fatal to debug into the database |
Warning |
---|
When overwriting resources.ZfExtended_Resource_Logger.writer.mail.receiver in installation.ini the default value from application.ini is overwritten too. That means the default receiver should be added to installation.ini too: resources.ZfExtended_Resource_Logger.writer.mail.receiver[] = 'your receiver' |
DirectMail different users for different errors
...
Code Block | ||
---|---|---|
| ||
resources.ZfExtended_Resource_Logger.writer.tasklog.filter[] = "level <= warn" ; first filter rule
resources.ZfExtended_Resource_Logger.writer.tasklog.filter[] = "level <= debug; domain ^= core.foo.bar" ; second filter rule
;ecodes can be filtered too (they are added internally in the filter to the domain):
resources.ZfExtended_Resource_Logger.writer.tasklog.filter[] = "level <= warn; domain $= E1234" ; filtering a specific ecode
|
Each filter rule is it self, a semicolon separated list of expressions. All expressions of one rule are connected via "and", so all expressions must be evaluated to true in order that the rule is valid.
...
In the following table a list of valid keywords and operands is listed:
Keyword | Valid Operands | Description |
---|---|---|
level | = | Is used to compare with the log levels as defined at the top of this page. The second operand must be a valid log level: "fatal", "error", "warn" etc. Example: given FATAL(1), configured "level <= WARN(4)" the event is filtered, since level 1 (fatal) is lesser then level 4 (warn) |
<= | Is true if the current level is equal or has a higher severity as the configured one. | |
>= | Is true if the current level is equal or has a lower severity as the configured one. | |
domain | = | The domain (origin) of the event must be matched completely. |
!= | The domain (origin) must not be equal to the configured one. | |
^= | The domain (origin) must start with the configured string. | |
$= | The domain (origin) must end with the configured string. | |
*= | The domain (origin) must contain the configured string. | |
exception | = | The exception equals the given exception class name |
!= | The exception is different to the given exception class name | |
*= | The current exception is a subclass of the given exception name |