Write to the log only if the debug flag is set true.

@param string $message
The message to write to the log.
@param array $context
Optional array to write to the log, nominally to convey the context.
497347
protected function debugLogger(string $message, array $context = []) {
    if ($this->debug) {
      $this->logger->debug($message, $context);
    }
  }
721093
public function debug($message, array $context = array())
    {
        if ($this->logger) {
            $context = $this->getLoggerContext($context);

            $this->logger->debug($message, $context);
        }
    }
833567
public function log($level, $message, array $context = array())
    {
        if ($this->outputIsUrgent($level) || $this->isEnabled()) {
            $this->dispatch($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);
    }
771258
public function error($message, array $context = [])
    {
        if ($message instanceof \Throwable) {
            $m = "[{$message->getCode()}] " . $message->getMessage();
            $m .= "\n";
            $m .= $message->getTraceAsString();
            $this->error($m, $context); // calling back this method with string argument
            return;
        }

        $this->log(LogLevel::ERROR, $message, $context);
    }
584506
public function alert($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->alert($message, $context);
        }

        return false;
    }
51726
protected function logDebug(string $message, array $context = []): void
    {
        if ($this->logger !== null) {
            $this->logger->debug($message, $context);
        }
    }
660282
public function log($level, $message, array $context = array())
    {
        $message = $this->formatMessage($level, $message, $context);        
        $this->write($message);
    }
1349359
public function log($level, $message, array $context = array()) {
		$this->entries[] = array($level, $message, $context);
		if($this->maxEntries > -1 && count($this->entries) >= $this->maxEntries) {
			$this->flush();
		}
	}
162283
public function log($message, $context = "[Strata]")
    {
        $logger = $this->getLogger();
        if (!is_null($logger)) {
            $logger->log($message, $context);
        }
    }
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);
		}
	}
968926
public function notice($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->notice($message, $context);
        }

        return false;
    }
384481
public function log($level, $message, array $context = []) {
        $realMessage = rtrim(static::interpolate($message, $context), "\n");
        if (STDOUT) {
            echo "{$realMessage}\n";
        }
    }
1058790
public static function debug($message, array $context = [], string $channel = self::DEFAULT_CHANNEL): void
    {
        self::log(LogLevel::DEBUG, $message, $context, $channel);
    }
289470
public function warning($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->warning($message, $context);
        }

        return false;
    }
74945
public function notice(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->notice($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::NOTICE);
        }
    }
443879
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);
			}
		}
		syslog($this->getLevel($level), $message);
	}