{@inheritdoc}

@param Integer $line
the line number
@param String $check
the name of the check
@param String $message
the text
@param String $level
the severity level
194863
public function writeError($line, $check, $message, $level = WARNING) {

		// Update the counters
		$this->nbErrors ++;
		$this->fileErrors ++;
		if ($this->fileInError === false) {
			$this->nbfilesError ++;
			$this->fileInError = true;
		}

		// Add the check to the details
		$detail = $this->_readTemplate("detail_body");
		$values = array();
		$values['%%message%%'] = htmlspecialchars($message);
		$values['%%check%%'] = $check;
		$values['%%line%%'] = $line;
		$values['%%level%%'] = $level;
		$detail = $this->_fillTemplate($detail, $values);
		$this->fileDetail .= $detail;
	}
847166
public function log($level, $message, array $context = array())
    {
        if (in_array($level, $this->levels)) {
            file_put_contents(
                $this->logFile, $message . PHP_EOL, FILE_APPEND
            );
        }
    }
416539
public function write($level, $message, array $context = array())
    {
        $color = $this->defaultColor;
        if (isset($this->levelColors[$level]) && $this->levelColors[$level]) {
            $color = $this->levelColors[$level];
        }

        $context = array(
            '__context' => $context,
            'color' => $color
        );

        $log = $this->format($level, $message, $context);
        $this->setLastLogLine($log);
        echo $log;
    }
401237
protected function log($level, $message, array $context = array())
    {
        if (null === $this->logger && $this->getServiceManager()->has('logger')) {
            $this->logger = $this->getServiceManager()->get('logger');
        }

        if ($this->logger) {
            $this->logger->log($level, $message, $context);
        }
    }
1140768
public function log($message, $level = LogLevel::INFO, $context = array())
    {
        $this->buildLogger->log($message, $level, $context);
    }
867361
public function log($level, $message, array $context = [])
    {
        if (!isset($this->logLevels[$level])) {
            $level = LogLevel::DEBUG;
        }

        if ($this->logLevels[$level] < $this->level) {
            // do not print.
            return;
        }

        if ($this->level === 3 && $this->logLevels[$level] === 3) {
            $style = 'dim';
        } else {
            $style = $this->levelStyles[$level];
        }

        if ($this->indent) {
            $this->write(\str_repeat($this->indentCharacter, $this->indent));
        }

        if (\is_object($message) || \is_array($message)) {
            $this->writeln(\print_r($message, true), $style);
        } else {
            $this->writeln($message, $style);
        }
    }
1187151
public function log(string $level, string $message, array $context = array(), $filename = null)
    {
        $this->setLogger($message, $context = [], $filename);
    }
557871
public function logMessage($message, $level = 0) {
        $this->getLogFile();
        if (!flock($this->_fp, LOCK_EX)) {
            throw new LoggerFileException('Can\'t obtain file lock for: ');
        }
        $text = '[' . date("H:i:s") . ']' . $this->_levelNames[$level] . " " . $message . "\n"; // Log message
        if (fwrite($this->_fp, $text)) {
            flock($this->_fp, LOCK_UN);
            return true;
        } else {
            flock($this->_fp, LOCK_UN);
            throw new LoggerFileException('Can\'t write to logfile!');
        }
    }
449277
public function log($level, $message, array $context = array()) {
		$result = preg_match(sprintf("/%s/%s", preg_quote($this->pattern, '/'), $this->modifiers), $message);
		if(!$result !== $this->negate) {
			$this->logger()->log($level, $message, $context);
		}
	}
762175
private function doWrite($level, $message) {
            $this->lastMessage = $message;
            $this->fopen();

            if ($this->fp && is_resource($this->fp)) {
                $message = $this->buildMessage($level, $message);
                $this->lastMessageFull = $message;
                $ok = $this->config->lock ? [flock($this->fp, LOCK_EX),
                                             fwrite($this->fp, $message),
                                             flock($this->fp, LOCK_UN)] : [fwrite($this->fp, $message)];

                return !in_array(false, $ok, true);
            }

            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }
893951
private function _writeError($check, $message, $lineNumber = null, $level = null) {
		if ($lineNumber === null) {
			$lineNumber = $this->lineNumber;
		}

		// If level not specified, get it in the config
		if ($level === null) {
			$level = $this->_config->getTestLevel($check);
			// If level not found in the config then WARNING by default.
			if ($level === null) {
				$level = WARNING;
			}
		}

		$this->errorCounts[$level] ++;

		$this->_reporter->writeError($lineNumber, $check, $message, $level);
	}
1053170
public function log($level, $message, array $context = array())
    {
        $this->getApplication()->getInitialContext()->getSystemLogger()->log($level, $message, $context);
    }
89057
public static function handlePhpError($level, $message, $file, $line)
    {

        // don't want to print suppressed errors
        if (error_reporting() > 0) {
            if (self::$phpErrorCapture) {
                self::$capturedPhpErrors[] = [
                    'message' => $message,
                    'level' => $level,
                    'line' => $line,
                    'file' => $file
                ];
            } else {
                $message = '[PHP Error] ' . $message;
                $message .= ' [line ' . $line . ' of ' . $file . ']';

                switch ($level) {
                    case E_USER_DEPRECATED:
                    case E_DEPRECATED:
                    case E_STRICT:
                    case E_NOTICE:
                    case E_USER_NOTICE:
                        self::log($message, Project::MSG_VERBOSE);
                        break;
                    case E_WARNING:
                    case E_USER_WARNING:
                        self::log($message, Project::MSG_WARN);
                        break;
                    case E_ERROR:
                    case E_USER_ERROR:
                    default:
                        self::log($message, Project::MSG_ERR);
                } // switch
            } // if phpErrorCapture
        } // if not @
    }
929396
final protected function log(string $level, string $message, array $context = [])
    {
        $this->provider('logger')->log($level, $message, $context);
    }
53515
public function log($level, $message, array $context = [])
    {
        $log_levels = array_flip(get_class_methods(__CLASS__));
        unset($log_levels['log']);

        if (isset($log_levels[$level])) {
            return $this->$level($message, $context);
        }
    }
1374749
private function log($message, $level)
    {
        // Only log if the logger is enabled.
        if (!$this->isEnabled) {
            return;
        }

        if ($level <= $this->level) {
            $requestId = null;
            try {
                $requestID = Application::getCurrent()->getRequestId();
            } catch (CoreException $exception) {
                $requestID = '---';
            }

            $logMessage = sprintf(
                '%s: %s [%s] %s' . PHP_EOL,
                $this->id,
                $requestId ?: '———',
                @self::$levelNames[$level],
                $message
            );

            // Commit the log message.
            if (empty($this->errorLogFile)) {
                // If no log file is specified, use the default PHP location.
                error_log($logMessage);
            } else {
                // Silence the eventual error if the message cannot be written
                // to the log, so that it doesn't interrupt the program.
                @file_put_contents(
                    $this->errorLogFile,
                    $logMessage,
                    FILE_APPEND
                );
            }
        }
    }
703683
public function handleError(int $level, string $message, string $file, int $line)
    {
        if (error_reporting() && $level) {
            throw new \ErrorException($message, 0, $level, $file, $line);
        }
    }