pixmicat - Diff between revs 845 and 891

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 845 Rev 891
Line 2... Line 2...
2 /** 2 /**
3  * A simple ILogger implementation. 3  * A simple ILogger implementation.
4  * Log everything it got to the log file. (Default log level: ERROR only) 4  * Log everything it got to the log file. (Default log level: ERROR only)
5  * 5  *
6  * @package PMCLibrary 6  * @package PMCLibrary
7  * @version $Id: lib_simplelogger.php 845 2013-01-12 08:28:15Z scribe $ -  
-   7  * @version $Id: lib_simplelogger.php 891 2013-09-11 12:21:28Z scribe $
8  */ 8  */
9 9
10 class SimpleLogger implements ILogger { 10 class SimpleLogger implements ILogger {
11         private $logName; 11         private $logName;
12         private $logFile; 12         private $logFile;
Line 65... Line 65...
65          * @param  array  $vars    Prarameters 65          * @param  array  $vars    Prarameters
66          */ 66          */
67         private function logFormat($logLevel, $message, array $vars) { 67         private function logFormat($logLevel, $message, array $vars) {
68                 $dateTime = date('c'); 68                 $dateTime = date('c');
69                 $message = vsprintf($message, $vars); 69                 $message = vsprintf($message, $vars);
70                 error_log("$dateTime $logLevel {$this->logName} - $message".PHP_EOL, -  
71                         3, $this->logFile); -  
-   70                 file_put_contents(
-   71                         $this->logFile,
-   72                         "$dateTime $logLevel {$this->logName} - $message".PHP_EOL,
-   73                         FILE_APPEND
-   74                 );
72         } 75         }
73 } 76 }