
Public Member Functions | |
| __construct (spunQ_ILogTarget $logTarget, spunQ_ICache $cache, $timeFrame=60) | |
| Constructor. | |
| logMessage ($path, $priority, $message, $file, $line) | |
| This function will be called by the logging facility. | |
Private Attributes | |
| $logTarget | |
| Actual log target to log to. | |
| $cache | |
| Cache to use for storing data about log entries. | |
| $timeFrame | |
| Number of seconds to wait between log attempts. | |
Will only log once to the provided log target in a defined time frame. Can be used to send mails only once an hour, for example.
Definition at line 8 of file CachedLogger.class.php.
| spunQ_CachedLogger::__construct | ( | spunQ_ILogTarget $ | logTarget, | |
| spunQ_ICache $ | cache, | |||
| $ | timeFrame = 60 | |||
| ) |
Constructor.
| $logTarget | Actual log target to log to. | |
| $cache | Cache to use for storing data about log entries. | |
| $timeFrame | Number of seconds to wait between loggings. |
Definition at line 34 of file CachedLogger.class.php.
| spunQ_CachedLogger::logMessage | ( | $ | path, | |
| $ | priority, | |||
| $ | message, | |||
| $ | file, | |||
| $ | line | |||
| ) |
This function will be called by the logging facility.
A logger rule matched a logging event that was triggered and this log target was provided to the rule.
| $path | The source of the log event. | |
| $priority | The priority with which the Logger was invoked. | |
| $message | The message of the log event. | |
| $file | The path to the file where the event actually occured. | |
| $line | The line within the file where the log event was triggered |
Implements spunQ_ILogTarget.
Definition at line 44 of file CachedLogger.class.php.
spunQ_CachedLogger::$cache [private] |
Cache to use for storing data about log entries.
Definition at line 20 of file CachedLogger.class.php.
spunQ_CachedLogger::$logTarget [private] |
Actual log target to log to.
Definition at line 14 of file CachedLogger.class.php.
spunQ_CachedLogger::$timeFrame [private] |
Number of seconds to wait between log attempts.
Definition at line 26 of file CachedLogger.class.php.
1.5.9