public function doLog(common_log_Item $item)
    {
        if (is_null($this->filehandle)) {
            $this->initFile();
        }
        if ($this->filehandle !== false) {
            $map = array(
                '%d' => gmdate('Y-m-d H:i:s', $item->getDateTime()),
                '%m' => $item->getDescription(),
                '%p' => $this->prefix,
                '%s' => $item->getSeverityDescriptionString(),
                '%t' => $item->getDateTime(),
                '%r' => $item->getRequest(),
                '%f' => $item->getCallerFile(),
                '%g' => implode(',', $item->getTags()),
                '%l' => $item->getCallerLine()
            );
            if (strpos($this->format, '%b')) {
                $map['%b'] = 'Backtrace not yet supported';
            }
            $str = strtr($this->format, $map) . PHP_EOL;
            @fwrite($this->filehandle, $str);
        }
    }
public function doLog(common_log_Item $item)
    {
        if (is_null($this->filehandle)) {
            $this->initFile();
        }
        if ($this->filehandle !== false) {
            $map = array(
                '%d' => gmdate('Y-m-d H:i:s', $item->getDateTime()),
                '%m' => $item->getDescription(),
                '%p' => $this->prefix,
                '%s' => $item->getSeverityDescriptionString(),
                '%t' => $item->getDateTime(),
                '%r' => $item->getRequest(),
                '%f' => $item->getCallerFile(),
                '%g' => implode(',', $item->getTags()),
                '%l' => $item->getCallerLine()
            );
            if (strpos($this->format, '%b')) {
                $map['%b'] = 'Backtrace not yet supported';
            }
            $str = strtr($this->format, $map) . PHP_EOL;
            @fwrite($this->filehandle, $str);
        }
    }
public function doLog ( common_log_Item $ item ) { if ( is_null ( $ this -> filehandle ) ) { $ this -> initFile ( ) ; } if ( $ this -> filehandle !== false ) { $ map = array ( '%d' => gmdate ( 'Y-m-d H:i:s' , $ item -> getDateTime ( ) ) , '%m' => $ item -> getDescription ( ) , '%p' => $ this -> prefix , '%s' => $ item -> getSeverityDescriptionString ( ) , '%t' => $ item -> getDateTime ( ) , '%r' => $ item -> getRequest ( ) , '%f' => $ item -> getCallerFile ( ) , '%g' => implode ( ',' , $ item -> getTags ( ) ) , '%l' => $ item -> getCallerLine ( ) ) ; if ( strpos ( $ this -> format , '%b' ) ) { $ map [ '%b' ] = 'Backtrace not yet supported' ; } $ str = strtr ( $ this -> format , $ map ) . PHP_EOL ; @ fwrite ( $ this -> filehandle , $ str ) ; } }
Prepares and saves log entries to file

@access public
@author Joel Bout, <joel.bout@tudor.lu>
@param common_log_Item $item
@return mixed
Prepares and saves log entries to file