Lib_Utils_FileLogger

The Gravity Forms Salesforce Add-On Lib Utils FileLogger class.

Defined (1)

The class is defined in the following location(s).

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Utils/FileLogger.php  
  1. class Lib_Utils_FileLogger { 
  2.  
  3. private $_filename; 
  4. private $_hanlder; 
  5. private $_withTimeStamps; 
  6.  
  7. function __construct($filename, $mode = 'a+', $withTimeStamps = FALSE) { 
  8. $this->_filename = $filename; 
  9. $this->_hanlder = fopen($filename, $mode); 
  10. $this->_withTimeStamps = $withTimeStamps; 
  11.  
  12. function __destruct() { 
  13. fclose($this->_hanlder); 
  14.  
  15. public function write($message) { 
  16. fwrite($this->_hanlder,  
  17. ($this->_withTimeStamps ? date(DateTime::ATOM) . ' ' : '') . $message . "\n");