...
The following levels are defined as class constants prefixed with LEVEL_ in ZfExtended_Logger class:
Level | Usage example |
---|---|
FATAL | FATAL PHP errors, other very fatal stuff, wrong PHP version or so |
ERROR | User locked out due multiple wrong login, common unhandled exceptions |
WARN | user entered wrong password |
INFO | for example user logins, wanted exceptions BadMethodCall on known non existent methods (HEAD), other known and wanted exceptions |
DEBUG | debugging on a level also useful for SysAdmins |
TRACE | tracing debugging on a level only useful for developers |
ZfExtended_Logger
- The logger itself. Methods of that class are used to log custom messages / data and exceptions / errors.
- A reusable default instance is located in the registry: Zend_Registry::get('logger');
- The default instance is initialized via the Resource Plugin ZfExtended_Resource_Logger and is therefore configured from the .ini configuration system as other Zend Resources too.
- Own instances with custom configuration can be instanced when needed
- The default instance is also accessible via Zend getResource stuff
- A Logger instance can have multiple writer instances which writes the received log messages to different targets - as configured.
- One can also define additional Logger instances if needed with a different config as the default one
provides functions like fatal, error, warn, info, debug, trace for direct log output
- provides a function exception to log exceptions, this is automatically invoked in the final exception handler but can also be used manually for catched exceptions, which have to be logged but should not stop the request then.
...