Last active
April 16, 2018 20:11
-
-
Save berliozd/7564e9047ff4cf5834c6064c86b21521 to your computer and use it in GitHub Desktop.
Custom home made logging
This file contains 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
<?php | |
private function _log($message) { | |
$file = '/var/www/html/yonka/var/log/didier.log'; | |
$writer = new \Zend_Log_Writer_Stream($file); | |
$format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL; | |
$formatter = new \Zend_Log_Formatter_Simple($format); | |
$writer->setFormatter($formatter); | |
$logger = new \Zend_Log($writer); | |
$logger->log($message, 4); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment