Assembla home | Assembla project page
 

Changeset 92

Show
Ignore:
Timestamp:
03/01/08 17:34:30 (9 months ago)
Author:
tobias382
Message:

Fixes #19 Added logging support for debugging to the base driver class

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Driver/Abstract.php

    r88 r92  
    7676    { 
    7777        if ($this->getIni('debug')) { 
    78             echo date('H:i:s') . ' ' . $message . "\n"; 
     78            $message = date('H:i:s') . ' ' . $message . "\n"; 
     79            echo $message; 
     80            if ($log = $this->getIni('log')) { 
     81                file_put_contents($log, $message, FILE_APPEND); 
     82            } 
    7983        } 
    8084    } 
  • trunk/Phergie/phergie.ini

    r72 r92  
    5555;    boolean flag indicating whether or not debugging mode should be enabled 
    5656debug = false 
     57 
     58; log : 
     59;    path to a file to which debugging output will be written if debugging  
     60;    mode is enabled 
     61log = debug.log 
    5762 
    5863;-----------------------------------------------------------------------------