Logs with an arbitrary level.

@param  mixed $level
@param  string $message
@param  array $context
@return null
966708
public function log($level, $message, array $context = array())
    {
        // create log entry
        $entry = $this->newLogEntry(
            $this->getChannel(),
            $level,
            $message,
            $context
        );

        // run processors
        $this->runProcessors($entry);

        // run handlers
        $this->runHandlers($entry);

        // unset current channel
        $this->current_channel = null;
    }
21184
public function log($level, $message, array $context = array()) {
		foreach($this->keyValueArray as $key => $value) {
			if(is_object($value)) {
				if(method_exists($value, '__toString')) {
					$value = (string)$value;
				} else {
					$value = json_encode($value);
				}
			}
			$context[$key] = $value;
		}
		$this->logger()->log($level, $message, $context);
	}
801410
final public function log($level, $message, array $context = array())
    {
        if (isset($this->levels[$level]) && $this->levels[$level] < $this->minLevel) {
            return;
        }
    
        if (empty($this->context) && empty($context)) {
            $context = [];
        } elseif ($this->context !== $context) {
            $context = array_merge($this->context, $context);
        }
        
        $context['level'] = $level;
        $context['datetime'] = date('Y-m-d H:i:s');
        
        try {
            $this->writer->write($context['datetime'].' ['.$level.'] '.$this->prefix.$message, $context);
        } catch (Exception $e) {
            $this->handleWriteError($e, $message);
        }
    }
161868
public function log($level, $message, array $context = [])
    {
        if (in_array($level, $this->acceptedLevels, true)) {
            $this->logger->log($level, $message, $context);
        }
    }
1077178
public function log($level, $message, array $context = array())
    {
        if ($this->loggerInstance !== null) {
            $this->loggerInstance->log($level, $message, $context);
        } elseif ($this->loggerCallback !== null) {
            call_user_func_array($this->loggerCallback, array($level, $message, $context));
        }
    }
125940
public function log($level, $message, array $context = [])
    {
        $messageToLog = $this->interpolate($message, $context);
        switch ($level) {
            case PsrLogLevel::EMERGENCY:
                Yii::error($messageToLog);
                break;
            case PsrLogLevel::ALERT:
                Yii::error($messageToLog);
                break;
            case PsrLogLevel::CRITICAL:
                Yii::error($messageToLog);
                break;
            case PsrLogLevel::ERROR:
                Yii::error($messageToLog);
                break;
            case PsrLogLevel::WARNING:
                Yii::warning($messageToLog);
                break;
            case PsrLogLevel::NOTICE:
                Yii::info($messageToLog);
                break;
            case PsrLogLevel::INFO:
                Yii::info($messageToLog);
                break;
            case PsrLogLevel::DEBUG:
                Yii::trace($messageToLog);
                break;
            default:
                throw new \Psr\Log\InvalidArgumentException(
                    'Unknown log level: ' . var_export($level, true),
                    1493998846
                );
        }
    }
660282
public function log($level, $message, array $context = array())
    {
        $message = $this->formatMessage($level, $message, $context);        
        $this->write($message);
    }
766329
public function log($level, $message, array $context = array())
    {
        $contextStr = empty($context) ? '' : ' ' . \json_encode($context, \JSON_UNESCAPED_SLASHES);
        \fwrite(\STDERR, \str_pad(\strtoupper((string)$level), 10) . $message . $contextStr . \PHP_EOL);
    }
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));
    }
979632
public function log($level, $message, array $context = [])
    {
        if (!$this->enabled) {
            return;
        }
        $message = self::replace($message, $context);
        if (is_resource($this->resource)) {
            fwrite($this->resource, "[{$level}] " . $message. "\n");
        } elseif (is_callable($this->resource)) {
            call_user_func($this->resource, "[{$level}] {$message}\n");
        } else {
            echo "[{$level}] {$message}\n";
        }
    }
270787
public function log ($level, $message, array $context = array ()) {
		$this->_log (
			$this->convert_log_level ($level),
			$message,
			$context
		);
	}
689858
public function log($level, $message, array $context = array())
    {
        if ($this->filtering && ! in_array($level, $this->enabled)) {
            return;
        }

        if ($this->apply_threshold) {
            return $this->writeThresholdedMessage($level, $message);
        }

        $this->writeMessage($level, $message);
    }
301202
public function log($level, $message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->log($level, $message, $context);
        }

        return false;
    }
1017914
public function log($level, $message, array $context = array())
    {
        fwrite($this->stream, $this->formatMessage($this->interpolate($message, $context)));
    }
48620
private static function log(string $level, string $message, array $context = [])
    {
        if (static::$logger !== null) {
            static::$logger->$level($message, $context);
        }
    }
210119
public static function log($level, $message, array $context = array())
    {
        return self::getInstance()->log($level, $message, $context);
    }
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
        );
    }