Log message
@param  mixed       $level
@param  mixed       $object
@param  array       $context
@return mixed|bool What the Logger returns, or false if Logger not set or not enabled
@throws \InvalidArgumentException If invalid log level
547356
public function log($level, $object, $context = array())
    {
        if (!isset(self::$levels[$level])) {
            throw new \InvalidArgumentException('Invalid log level supplied to function');
        } else if ($this->enabled && $this->writer && $level <= $this->level) {
            $message = (string)$object;
            if (count($context) > 0) {
                if (isset($context['exception']) && $context['exception'] instanceof \Exception) {
                    $message .= ' - ' . $context['exception'];
                    unset($context['exception']);
                }
                $message = $this->interpolate($message, $context);
            }
            return $this->writer->write($message, $level);
        } else {
            return false;
        }
    }
618674
public function log($level, $message, array $context = []) {
        $levelPriority = self::levelPriority($level);
        if ($levelPriority > LOG_DEBUG) {
            throw new \Psr\Log\InvalidArgumentException("Invalid log level: $level.");
        }

        // Prevent an infinite cycle by setting an internal flag.
        static $inCall = false;
        if ($inCall) {
            return;
        }
        $inCall = true;

        foreach ($this->loggers as $logger) {
            /* @var LoggerInterface $logger */
            if (!$logger['enabled']) {
                continue;
            }

            if ($logger['priority'] >= $levelPriority) {
                try {
                    $logger['logger']->log($level, $message, $context);
                } catch (\Exception $ex) {
                    $inCall = false;
                    throw $ex;
                }
            }
        }

        $inCall = false;
    }
1119916
protected function log(string $level, string $message, array $context = []) {
        if (!is_array($context)) {
            $context = [];
        }
        $context = array_merge([
            'pid' => posix_getpid(),
            'time' => date('Y-m-d H:i:s'),
            'message' => $message
        ], $context);

        $this->getLogger()->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));
        }
    }
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
        );
    }
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";
        }
    }
1113257
public function log($level, $message, array $context = []) {
		$message = trim($message);
		$summary = Text::truncate($message, 255);

		$data = [
			'type' => $level,
			'summary' => $summary,
			'message' => $message,
			'context' => trim(print_r($context, true)),
			'count' => 1,
		];
		$log = $this->newEntity($data);

		return (bool)$this->save($log);
	}
1160507
public function log($level, $message, array $context = array()) {
		$message = sprintf($this->format, $message);
		$this->logger()->log($level, $message, $context);
	}
384481
public function log($level, $message, array $context = []) {
        $realMessage = rtrim(static::interpolate($message, $context), "\n");
        if (STDOUT) {
            echo "{$realMessage}\n";
        }
    }
223047
public function log($level, $message, array $context = array()) {
        if (!isset($this->wraps[$level])) {
            throw new InvalidArgumentException("Invalid log level: $level", 400);
        }

        $msg = $this->replaceContext($message, $context);

        $eol = true;
        $fullLine = true;
        $str = ''; // queue everything in a string to avoid race conditions

        if ($this->bufferBegins()) {
            if (!empty($context[TaskLogger::FIELD_BEGIN])) {
                if ($this->inBegin) {
                    $str .= $this->eol;
                } else {
                    $this->inBegin = true;
                }
                $eol = false;
            } elseif (!empty($context[TaskLogger::FIELD_END]) && strpos($msg, "\n") === false) {
                if ($this->inBegin) {
                    $msg = ' '.$msg;
                    $fullLine = false;
                    $this->inBegin = false;
                }
            } elseif ($this->inBegin) {
                $str .= $this->eol;
                $this->inBegin = false;
            }
        }

        $str .= $this->fullMessageStr($level, $msg, $context, $fullLine);

        if ($eol) {
            $str .= $this->eol;
        }

        if (!is_resource($this->outputHandle) || feof($this->outputHandle)) {
            trigger_error('The StreamLogger output handle is not valid.', E_USER_WARNING);
        } else {
            fwrite($this->outputHandle, $str);
        }
    }
1010033
public function log($level, $message, array $context = array()) {
        $context['fromClass'] = get_called_class();
        foreach ($this->loggersInstances as $logger) {
            $logger->log($level, $message, $context);
        }
    }
183991
public function log($level, $message, array $context = array()) {
    	if (!isset(self::$levels[$level]) || $level == 'none') {
    		throw new \Psr\Log\InvalidArgumentException("Error, level '".$level."' is not a valid log level. The \$level property must be one of 'emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'");
    	}
    	
    	// If the level is greater than the max level we log, let's not log anything.
    	if (self::$levels[$level] > $this->level) {
    		return;
    	}
    	
    	$exceptionText = '';
    	if (isset($context['exception'])) {
    		$e = $context['exception'];
			if ($e instanceof \Exception || $e instanceof \Throwable) {
    			$exceptionText = "\n".self::getTextForException($e);
			}
    	}
		$trace = debug_backtrace();
		$string = self::interpolate((string) $message, $context);
    	error_log(strtoupper($level).': '.$trace[1]['file']."(".$trace[1]['line'].") ".(isset($trace[2])?($trace[2]['class'].$trace[2]['type'].$trace[2]['function']):"")." -> ".$string.$exceptionText);
    }
942834
public function log($level, $message, array $context = array())
    {
        if ($this->_logLevel >= self::LOG_LEVEL_DEBUG) {
            error_log($message . "\n", 3, $this->_logFile);
        }
    }
396649
public function log($level, $message, array $context = array()) {
		$message = call_user_func($this->fn, $level, $message, $context);
		$this->logger()->log($level, $message, $context);
	}
835802
public function log($level, $message, array $context = array())
    {
        if (!isset(self::$levels[$level])) {
            throw new InvalidArgumentException('Unsupported log level "' . $level . '"');
        }
        if (self::$levels[$level] > self::$levels[$this->level]) {
            return;
        }

        $message = '[' . date('Y-m-d H:i:s') . '] [' . strtoupper($level) . '] '
            . self::processMessage($message, $context);

        $this->addRecord($message);
    }
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);
    }
947455
public static function log($level, $message, array $context = array())
    {
        App::getBean('Logger')->log($level, $message, static::parseContext($context));
    }