public function log($msg, $timestamp = true)
    {
        if ($timestamp) {
            $timestamp = strftime("%Y-%m-%d %H:%M:%S");
            $msg = "[{$timestamp}] {$msg}";
        }
        $this->addResult($msg);
        if ($this->verbose) echo $msg . PHP_EOL;
    }
public function log($msg, $timestamp = true)
    {
        if ($timestamp) {
            $timestamp = strftime("%Y-%m-%d %H:%M:%S");
            $msg = "[{$timestamp}] {$msg}";
        }
        $this->addResult($msg);
        if ($this->verbose) echo $msg . PHP_EOL;
    }
public function log ( $ msg , $ timestamp = true ) { if ( $ timestamp ) { $ timestamp = strftime ( "%Y-%m-%d %H:%M:%S" ) ; $ msg = "[{$timestamp}] {$msg}" ; } $ this -> addResult ( $ msg ) ; if ( $ this -> verbose ) echo $ msg . PHP_EOL ; }
Log a result message and echo it if verbose is true.

@param string $msg The result message.
@param bool   $timestamp Indicates if the log entry should include a timestamp.

@return void
Log a result message and echo it if verbose is true .