Performs the actual log operation.

@author Art <a.molcanovas@gmail.com>

@param string $level   Log level
@param string $message Raw message

@return bool
762175
private function doWrite($level, $message) {
            $this->lastMessage = $message;
            $this->fopen();

            if ($this->fp && is_resource($this->fp)) {
                $message = $this->buildMessage($level, $message);
                $this->lastMessageFull = $message;
                $ok = $this->config->lock ? [flock($this->fp, LOCK_EX),
                                             fwrite($this->fp, $message),
                                             flock($this->fp, LOCK_UN)] : [fwrite($this->fp, $message)];

                return !in_array(false, $ok, true);
            }

            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }
157184
public function log($message, $level, $a = null, $depth = null, $display = false) {
        return $this->step->log($message, $level, $a, $depth, $display);
    }
277266
public function log($level, $message, array $context = array())
    {
        return error_log(self::PREFIX.' '.strtoupper($level).': '.$message.' '.
            (!empty($context) ? print_r($context, true) : ''));
    }
130157
public function log(int $level, string $message)
    {
        // no log command
        if (!$level || ($level & $this->level) == 0) {
            return;
        }

        // ensure log directory
        $this->checkDirectory();

        // prepare message prepend
        $levelText = '';
        switch ($level) {
            case self::FAIL:
                $levelText = 'FAIL';
                break;
            case self::INFO:
                $levelText = 'INFO';
                break;
            case self::WARN:
                $levelText = 'WARN';
                break;
            case self::DEBUG:
                $levelText = 'DEBUG';
                break;
        }

        // prepare message & message file
        $message = sprintf('[%s] %s >> %s', $levelText, date('D, d M Y H:i:s O'), trim($message) ."\n");
        $messageFile = sprintf('%s/%s.log', $this->directory, date('Y-m-d'));

        return error_log($message, 3, $messageFile);
    }
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";
        }
    }
942834
public function log($level, $message, array $context = array())
    {
        if ($this->_logLevel >= self::LOG_LEVEL_DEBUG) {
            error_log($message . "\n", 3, $this->_logFile);
        }
    }
705791
public static function log($message, array $context = array(), $level = Logger::INFO, $logname = null)
    {
        $_this = self::getInstance();
        if ($_this->getOption('enable_logging')===false) {
            return;
        }
        $default_context = array(
            'url' => $_this->getRequest()->getUrl()
        );
        return self::getInstance()->getLogger()
            ->log($level, $message, array_merge($default_context, $context), $logname);
    }
867361
public function log($level, $message, array $context = [])
    {
        if (!isset($this->logLevels[$level])) {
            $level = LogLevel::DEBUG;
        }

        if ($this->logLevels[$level] < $this->level) {
            // do not print.
            return;
        }

        if ($this->level === 3 && $this->logLevels[$level] === 3) {
            $style = 'dim';
        } else {
            $style = $this->levelStyles[$level];
        }

        if ($this->indent) {
            $this->write(\str_repeat($this->indentCharacter, $this->indent));
        }

        if (\is_object($message) || \is_array($message)) {
            $this->writeln(\print_r($message, true), $style);
        } else {
            $this->writeln($message, $style);
        }
    }
557160
public function log($level, $message, array $context = [])
    {
        /** @var LoggerInterface|AdapterInterface $logTarget */
        foreach ($this->logTargets as $logTarget) {
            if (($logTarget instanceof AdapterInterface)) {
                $logTarget->log($this->getPhalconLoggerLevel($level), $message, $context);
            } else {
                $logTarget->log($level, $message, $context);
            }
        }
    }
743932
public function log($level, $message, $context = [])
    {
        // This will be empty when output messages are triggered by the command
        // when it's NOT called by a worker option
        if (empty($this->logger)) {
            return;
        }

        // Call the logger's level specific methods
        $method = 'add'.ucfirst($level);
        $this->logger->$method($message, $context);
    }
958551
public function log($level, $message, array $context = array())
    {
        $log_id = '';
        if ($this->_levels[$this->_level] < $this->_levels[$level]) {
            return false;
        }

        if ($this->_levels[$level] <= $this->_levels[LogLevel::ERROR]) {
            $this->last_log_id = $this->generateId();
            $log_id = "{{$this->last_log_id}} ";
        }

        if (!empty($context)) {
            $message .= PHP_EOL.$this->indent($this->dumpContext($context));
        }

        $message = "[{$this->getTimestamp()}] [".strtoupper($level)."] {$log_id}{$message}".PHP_EOL;

        $this->write($message);

        return true;
    }
944392
protected function _log($level, $message) {
        $message = 'TURPENTINE: '.$message;
        Mage::log($message, $level, $this->_getLogFileName());
        return $message;
    }
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);
	}
166247
public function tLog(string $level, string $message, array $context = []) {
        $logtag = $this->getLogTag();
        if (is_array($message) || is_object($message)) {
            $message = print_r($message, true);
        }
        $this->log($level, "[{time}] [{$logtag}] ".$message, $context);
    }
853616
public function log($level, $message, array $context = array())
    {
        return $this->_log(null, $level, $message, $context);
    }
1206037
public static function log( $level, $message, array $context = [] )
	{
		return static::__do( __FUNCTION__, args_with_keys( func_get_args(), __CLASS__, __FUNCTION__ ) );
	}
820951
private function logEvent($event, $message, $level)
    {
        if ($event === 'not-allowed') {
            $message = sprintf('Method Not Allowed: %s', $message);
        } elseif ($event === 'not-found') {
            $message = sprintf('Page Not Found: %s', $message);
        }

        $this->logger->$level($message);
    }