Logs with an arbitrary level.

@param mixed  $level
@param string $message
@param array  $context

@return null
545213
public function log($level, $message, array $context = array())
    {
        // On ne logge qu'en fonction du niveau souhaité
        if (self::getLevelAsInt($level) <= self::getLevelAsInt($this->level)) {
            $myMsg = \FreeFW\Tools\PBXString::parse($message, $context);
            $this->write($myMsg, $level);
        }
        if ($level >= \Psr\Log\LogLevel::ERROR) {
            // send alert to monitoring...
            // APP_NAME, server name, broker...
        }
    }
1053170
public function log($level, $message, array $context = array())
    {
        $this->getApplication()->getInitialContext()->getSystemLogger()->log($level, $message, $context);
    }
767828
public function log($level, $message, array $context = [])
    {
        echo sprintf(
            'LOG: [%s] %s',
            $level,
            $this->interpolate($message, $context)
        ) . PHP_EOL;
    }
54599
public function log($level, $message, array $context = []) {
		if (!Logger::check($level)) {
			return;
		}
		if (count($context) > 0) {
			foreach ($context as $k => $v) {
				$message = str_replace('{' . $k . '}', $v, $message);
			}
		}
		$content = sprintf("%s | %s | %s | %s", date('Y-m-d H:i:s'), $this->getLevel($level), microtime(true), $message);
		co::fwrite($this->handler, $content);
	}
1187151
public function log(string $level, string $message, array $context = array(), $filename = null)
    {
        $this->setLogger($message, $context = [], $filename);
    }
805148
public function log($level, $message, array $context = array())
    {
        if ($this->logLevels[$this->logLevelThreshold] < $this->logLevels[$level]) {
            return;
        }
        $message = $this->formatMessage($level, $message, $context);
        $this->write($message);
    }
1297898
public function log($level, $message, array $context = array())
    {
        $messageArray = [
            date('Y/m/d H:i:s')." [". $level . "] " . $message
        ];

        if (!empty($context)) {
            $messageArray[] = 'Context:';
            foreach ($context as $key => $value) {
                $messageArray[] =  $key . ' => ' . var_export($value, true);
            }
        }
        $trace = $this->getTrace();
        $messageArray[] = 'Trace:';
        $messageArray[] = $trace['trace'];

        $file = $this->path . DIRECTORY_SEPARATOR . 'application.log';
        if (!file_exists($this->path)) {
            mkdir($this->path, 0777, true);
        }

        file_put_contents(
            $file,
            implode("\n", $messageArray),
            FILE_APPEND
        );
    }
48620
private static function log(string $level, string $message, array $context = [])
    {
        if (static::$logger !== null) {
            static::$logger->$level($message, $context);
        }
    }
1287363
public function log($level, $message, array $context = array()):Logger
    {
        $msg = $this->formatMessage($level, $message, $context);
        foreach ($this->handlers as $handler) {
            $handler($level, $msg);
        }
        return $this;
    }
1084317
public function log($level, $message, array $context = array())
    {
        $errorLevel = isset(self::$map[$level]) ? self::$map[$level] : common_Logger::ERROR_LEVEL;
        $this->logger->log($errorLevel, $message, $context);
    }
1170610
public function log($level, $message, array $context = [])
    {
        $message = $this->_format($message, $context);
        $output = date('Y-m-d H:i:s') . ' ' . ucfirst($level) . ': ' . $message;

        return (bool)$this->_output->write(sprintf('<%s>%s</%s>', $level, $output, $level));
    }
744233
public function log($level, $message, array $context = array())
    {
        $levelCode = array_search($level, self::$levels, true);
        if ($levelCode === false) {
            throw new InvalidArgumentException(
                sprintf(
                    'Cannot use unknown logging level "%s"',
                    $level
                )
            );
        }
        if ($levelCode > $this->logLevel) {
            return;
        }

        $this->getInnerLogger()->log($level, $message, $context);
    }
708163
public function log($level, $message, $context = array())
    {
        $level = isset($this->levels[$level]) ? $level : $this->level;

        // Check if the level would be handled
        if (isset($this->levels[$level])) {
            if ($this->levels[$level] < $this->levels[$this->handledLevel]) {
                return false;
            }
        }

        return $this->writeLog($level, $message, $context);
    }
1321424
public function log($level, $message, array $context = array()) {
        $realMessage = rtrim(static::interpolate($message, $context), "\n");

        if (isset($context['event'])) {
            $realMessage = sprintf("<%s> %s", $context['event'], $realMessage);
        }

        $realMessage = sprintf("[%s] %s\n", $level, $realMessage);

        syslog($level, $realMessage);
    }
697105
public function log($level, $message, array $context = [])
    {
        // Resolve category from 'context'
        $category = ArrayHelper::remove($context, 'category', $this->category);

        // Resolve level
        $level = ArrayHelper::getValue($this->map, $level, $this->level);

        $this->logger->log(
            $this->interpolate($message, $context),
            $level,
            $category
        );
    }
736473
public function log($level, $message, array $context = array()) {
		$captions = $this->captionTrail->getCaptions();
		$message = $this->messageRenderer->render($message, $captions);
		$context = $this->contextExtender->extend($this->context, $context);
		$this->logger->log($level, $message, $context);
	}
250457
static public function log($level, $message, array $context = array())
    {
        self::getDefaultLogger()->log($level, $message, $context);
    }