Writes a $line to the log with the given severity

@param string  $line     Text to add to the log
@param integer $severity Severity level of log message (use constants)
@param array|string $args
190777
public function log($line, $severity, $args = self::NO_ARGUMENTS)
	{
        if ($this->_severityThreshold >= $severity) {
            $status = $this->_getTimeLine($severity);
            
            $line = "$status $line";
            
            if ($args !== self::NO_ARGUMENTS) {
                /* Print the passed object value */
                $line = $line . '; ' . var_export($args, true);
            }
            
            $this->writeFreeFormLine($line . PHP_EOL);
			
			if ($this->_mailingSeverity >= $severity) {
				$this->mailLogging($line,$severity);
			}
        }
    }
1109695
public function log($line, $level = 1)
    {
        // Check if logging is enabled
        if (!$this->_loggingEnabled)
            return false;

        // Check if the level is within the required level
        if (!$this->_isLoggingSet($level))
            return false;

        $dateTime = date("H:i:s", time());
        $line = "{$dateTime} [ICEPAY]: {$line}" . PHP_EOL;

        // Log to Screen
        if ($this->_logToScreen)
            echo "{$line} <br />";

        // Log to Hooked Class
        if ($this->_logToHook && $this->_logHookClass && $this->_logHookFunc) {
            $function = $this->_logHookFunc;
            $this->_logHookClass->$function($line);
        }


        // Log to Default File
        if ($this->_logToFile) {
            $file = $this->_loggingDirectory . DS . $this->_loggingFile;

            try {
                $fp = fopen($file, "a");
                fwrite($fp, $line);
                fclose($fp);
            } catch (Exception $e) {
                throw new Exception($e->getMessage());
            };
        }
    }
488371
function _writeln($line)
    {
        /* Add this line to our output buffer. */
        $this->_buffer[] = $line;

        /* Buffer the output until this page's headers have been sent. */
        if (!headers_sent()) {
            return;
        }

        /* If we haven't already opened the output window, do so now. */
        if (!$this->_opened && !$this->open()) {
            return;
        }

        /* Drain the buffer to the output window. */
        $this->_drainBuffer();
    }
984424
public function critical(
        $msg,
        array $args = array(),
        \Exception $exception = null
    ) {
        return $this->log(\Plop\CRITICAL, $msg, $args, $exception);
    }
746467
public static function writeLines($path, $lines)
    {
        if (is_file($path) && !is_writable($path)) {
            throw new RuntimeException("File '$path' is not a writable file");
        }

        // make sure every line has only one newline at the end
        $lines = array_map(function ($line) {
            return rtrim($line);
        }, $lines);

        $bytes = file_put_contents($path, implode("\n", $lines));
        if ($bytes === false) {
            throw new RuntimeException("Something went wrong while writing content to '$path'");
        }

        return true;
    }
969005
public function save($args)
    {
        $normalized = $this->normalizeArgs(is_array($args) ? $args : []);
        if (!is_array($normalized)) {
            throw new Exception(implode("\n", $normalized->getList()));
        }
        parent::save($normalized);
    }
781908
private function log($line, $log_level) 
	{
		// Write all events less than log verbosity
		if ($log_level <= $this->log_verbosity) {
			$line = $this->prepend($log_level) . $line . "\n";
			$this->writeLine($line);
		}
	}
1346107
protected function write($message, $severity)
    {
        $log = new \Log('acumulus.log');
        $message = sprintf('%s - %s', $this->getSeverityString($severity), $message);
        $log->write($message);
    }
776980
public function display($line)
    {
        $server = $this->username.'@'.$this->host;

        $lead = '<comment>['.$server.']</comment> <info>('.$this->name.')</info>';

        $this->getOutput()->writeln($lead.' '.$line);
    }
91391
protected function write($message, $severity)
    {
        $logger = $this->getLogger();
        $logger->log($message, $this->getPrestaShopSeverity($severity));
    }
1229890
public function appendToLine($originalLine, array $lines)
    {
        // Why is this one method different to the rest?
        $originalLine++;

        $this->buffer->insert($this->createLineNumber($originalLine), $lines);
    }
863817
public static void d(final String msg, final Object... args) {
    LOG.preprocessArgs(args);
    LOG.log(Severity.Debug, msg, args);
  }
329308
public function addErrorOutput($line)
    {
        $this->lastOutputTime = microtime(true);

        fseek($this->stderr, 0, SEEK_END);
        fwrite($this->stderr, $line);
        fseek($this->stderr, $this->incrementalErrorOutputOffset);
    }
1047062
private function doWrite($messages, $newline, $stderr, $verbosity)
    {
        $sfVerbosity = $this->verbosityMap[$verbosity];
        if ($sfVerbosity > $this->output->getVerbosity()) {
            return;
        }

        $this->getOutputToWriteTo($stderr)->write($messages, $newline, $sfVerbosity);
    }
196611
public function logWarn($line, $args = self::NO_ARGUMENTS)
	{
        $this->log($line, self::WARN, $args);
    }
664737
public function mailLogging($line, $severity)
	{
		if (count($this->mailingList) > 0) {
		    $To = implode(', ', $this->mailingList);

			$Body			= $line;
			$Subject		= "[LOGGING] Severity: $severity";
			$CustomHeaders	= 'MIME-Version: 1.0' . "\r\n";
			$CustomHeaders	.= 'X-Priority: 1 (Highest)' . "\r\n";
			$CustomHeaders	.= 'X-MSMail-Priority: High' . "\r\n";
			$CustomHeaders	.= 'Importance: High' . "\r\n";
			$CustomHeaders 	.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
			
			@mail($To, $Subject, $Body, $CustomHeaders);
		}
	}
862758
public function writeError($line, $check, $message, $level = WARNING) {
		$msg = "\t" . $level . " Line:" . $line . ": " . $message . PHP_EOL;
		$this->_write($msg);
	}