Interesting events. Examples: User logs in, SQL logs.»
@param $message
@param $context
@param string $channel
168768
public static function info($message, $context = [], $channel = 'tastphp.logger')
    {
        $logger = static::getLoggerByLevelAndChannel(Monolog::INFO, $channel);
        $logger->addInfo($message, $context);
    }
759825
public static function warning($message, $context = [], $channel = 'tastphp.logger')
    {
        $logger = static::getLoggerByLevelAndChannel(Monolog::WARNING, $channel);
        $logger->addWarning($message, $context);
    }
955691
public function log($level, $message, array $context = [])
    {
        if (isset($context['name'])) {
            $name = $context['name'];
            unset($context['name']);
        } else {
            $name = 'log.' . $level;
        }

        $event = new Event($name);
        $event->setLevel($level)
            ->setMessage($message)
            ->setContext($context);

        self::emit($event);
    }
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);
    }
353580
public function log($level, $message, array $context = array())
    {
        if (!array_key_exists($level, $this->levels)) {
            $level = $this->defaultLevel;
        }
        
        $level = \LoggerLevel::toLevel($this->levels[$level], $this->defaultLevel);
        
        $message = $this->formatter->format($level, $message, $context);

        $this->logger->log($level, $message);
    }
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";
        }
    }
919676
public static function emergency($message, $context = [], $channel = 'tastphp.logger')
    {
        $logger = static::getLoggerByLevelAndChannel(Monolog::ALERT, $channel);
        $logger->addEmergency($message, $context);
    }
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);
	}
944988
public function notice($message, array $context = []): void {
        $this->log(LogLevel::NOTICE, $message, $context);
    }
407576
public static function log($level, $message, array $context = [], string $channel = self::DEFAULT_CHANNEL): void
    {
        self::getLoggerForChannel($channel)->log($level, $message, $context);
    }
962669
public function event($event, $level, $message, $context = []) {
        $context['event'] = $event;
        $this->log($level, $message, $context);
    }
7108
public function error($channel, $message, array $context = [])
    {
        $this->log($channel, LogLevel::ERROR, $message, $context);

        return $this;
    }
721093
public function debug($message, array $context = array())
    {
        if ($this->logger) {
            $context = $this->getLoggerContext($context);

            $this->logger->debug($message, $context);
        }
    }
1339605
protected function log($message, $context)
    {
        $logger = $this->getLogger();
        if ($logger !== null) {
            $logger->error($message, $context);
        }
    }
994369
public function log($level, $message, array $context = []) {
        $realMessage = rtrim(static::interpolate($message, $context), "\n");
        $levelC = strtoupper(substr($level,0,1));
        $realMessage = sprintf("[ %1s ] %s\n", $levelC, $realMessage);

        fwrite($this->fr, $realMessage);
    }
384481
public function log($level, $message, array $context = []) {
        $realMessage = rtrim(static::interpolate($message, $context), "\n");
        if (STDOUT) {
            echo "{$realMessage}\n";
        }
    }
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
            );
        }
    }