Banago\PHPloy\PHPloy::log PHP Метод

log() защищенный Метод

Log a message to file.
protected log ( string $message, string $type = 'INFO' )
$message string The message to write
$type string The type of log message (e.g. INFO, DEBUG, ERROR, etc.)
    protected function log($message, $type = 'INFO')
    {
        if (isset($this->servers[$this->currentlyDeploying]['logger']) && $this->servers[$this->currentlyDeploying]['logger']) {
            $filename = getcwd() . DIRECTORY_SEPARATOR . 'phploy.log';
            if (!file_exists($filename)) {
                touch($filename);
            }
            // Format: time --- type: message
            file_put_contents($filename, date('Y-m-d H:i:sP') . ' --- ' . $type . ': ' . $message . PHP_EOL, FILE_APPEND);
        }
    }