Auth Options | Storage drivers |
Auth | |
PEAR Manual | |
Since version 1.5.0 PEAR::Auth provides a facility for retrieving logs of its internal behaviour. This is implemented using PEAR::Log and its log observer components.
Auth provides two levels of log messages which map to the Log priority levels PEAR_LOG_INFO and PEAR_LOG_DEBUG.
PEAR_LOG_INFO messages provide basic information about Auth's decisions, for example user authentication successful/failed, rendering login screen.
PEAR_LOG_DEBUG messages provide detailed information about what is happening within the internals of Auth, for example which functions are called, logic tracking for the Authentication method, what SQL queries are being run against the database backends.
Typical usage example for accessing the logs from PEAR::Auth
|
To enable logging pass the option "enableLogging" with the value TRUE in the options array in the second parameter to the Auth constructor.
To retrieve the log messages from Auth create a new subclass of Log_Observer that implements a notify() function to perform whatever actions you want on the log messages.
Once defined pass an instance of your new Log_Observer instance to Auth::attachLogObserver().
To limit the types of messages you receive in the Log_Observer pass either PEAR_LOG_INFO or PEAR_LOG_DEBUG as the first parameter to the Log_Observer. The default is PEAR_LOG_INFO. For more information on this filtering see the Log Documentation.
|
This container has only been available since version 1.5.0.
Auth Options | Storage drivers |
Auth | |
PEAR Manual | |