public function log($data, $level = self::LEVEL_INFO, $type = null)
    {
        if (!is_string($data)) {
            $data = print_r($data, true);
        }

        file_put_contents(
            $this->getLogDirectory() . '/' . $this->getLogFilename(),
            $this->getLogMessage($data, $level, $type),
            FILE_APPEND
        );
    }
public function log($data, $level = self::LEVEL_INFO, $type = null)
    {
        if (!is_string($data)) {
            $data = print_r($data, true);
        }

        file_put_contents(
            $this->getLogDirectory() . '/' . $this->getLogFilename(),
            $this->getLogMessage($data, $level, $type),
            FILE_APPEND
        );
    }
public function log ( $ data , $ level = self :: LEVEL_INFO , $ type = null ) { if ( ! is_string ( $ data ) ) { $ data = print_r ( $ data , true ) ; } file_put_contents ( $ this -> getLogDirectory ( ) . '/' . $ this -> getLogFilename ( ) , $ this -> getLogMessage ( $ data , $ level , $ type ) , FILE_APPEND ) ; }
Write or print a log

@param mixed $data Data to log
@param string $level Event type
@param mixed $type Additional identifier
@return mixed|void
Write or print a log