Created
May 23, 2011 19:44
-
-
Save eminetto/987425 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$writer = new Zend_Log_Writer_Stream(DATA_PATH . 'zf_log.txt'); | |
$db = Zend_Db::factory("pdo_sqlite", array('dbname'=>DATA_PATH.'zf_log.db')); | |
$columnMapping = array('pri' => 'priority', 'msg' => 'message'); | |
$dbWriter = new Zend_Log_Writer_Db($db, 'log', $columnMapping); | |
$log = new Zend_Log(); | |
$log->addWriter($writer); | |
$log->addWriter($dbWriter); | |
Zend_Registry::set('log', $log); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment