ZF-9331: Zend_Log should have event creation extracted to a method


I recently found myself needing to use {{Zend_Log}} to create entries with a UTC timestamp (using {{gmdate()}}). However, in order to do this with the existing {{Zend_Log}} I have to override the entire 50 line {{Zend_Log::log()}} method, which makes my subclass very brittle.

I propose moving the event creation to a method like so:

$event = $this->_packEvent($message, $priority);
// ...
protected function _packEvent($message, $priority)
    return array_merge(array(
        'timestamp' => date('c'),
        'message' => $message,
        'priority' => $priority,
        'priorityName' => $this->_priorities[$priority]),

This will not cause any BC breaks, and is harmless.



I think that this issue can be closed assigned fix version to minor release, the patch was applied in r21331.