Write message

@param  int $level
@param  string $message
@return void
508811
private function _log($level, $message)
    {
        $level_config = Config::get("log_level");
        if (!$level_config) {
            $level_config = "DEBUG";
        }

        $level_val = self::$levels[$level];
        $level_config = self::$levels[$level_config];

        if ($level_config > $level_val) {
            return ;
        }

        wlog($level, $message);
    }
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);
    }
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);
    }
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);
    }
976021
public function log($level, $message, array $context = array())
    {
        if (!$this->canLog($level)) {
            return;
        }
        $levelCode = $this->levelCode[$level];
        $data = $this->message->process($levelCode, $level, $message, $context);
        foreach ($this->channels as $channel) {
            $channel->deliver($level, $data);
        }
    }
829937
public function log($level, $message, array $context = array()) {
		$message = strtr($message, $this->replacement);
		$this->logger()->log($level, $message, $context);
	}
933454
protected function write($message, $level = false)
    {
        $now  = \DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''));
        $line = array(
            'pid'  => self::$pid,
            'time' => $now->format("d/m/Y H:i:s.u")
        );
        if ($level !== false) {
            $line['$level'] = $level;
        } else {
            $line['$level'] = '........';
        }
        $line['mesg'] = $message;
        if (!$this->cache) {
            $this->flush();
        }
        $this->tabCache[] = $line;
        try {
            $params = [
                'appCode'    => APP_NAME,
                'appClient'  => '',
                'appSession' => session_id(),
                'appTs'      => microtime(),
                'appDate'    => date('c'),
                'appType'    => $level,
                'appErrNum'  => 0,
                'appErrMsg'  => (string)$message,
                'appErrFile' => '',
                'appErrLine' => 0,
                'appData'    => []
            ];
            if (isset($_SERVER) && array_key_exists('REQUEST_URI', $_SERVER)) {
                $params['requestUri'] = $_SERVER['REQUEST_URI'];
                $params['requestIp']  = self::getClientIp();
                $params['requestUA']  = $_SERVER['HTTP_USER_AGENT'];
                if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER)) {
                    $params['requestLg'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
                }
            }
            $this->tabBeat[] = $params;
        } catch (\Exception $ex) {
            // @nothing
        }
        if (!$this->cache) {
            $this->commit();
        }
        return $this;
    }
161868
public function log($level, $message, array $context = [])
    {
        if (in_array($level, $this->acceptedLevels, true)) {
            $this->logger->log($level, $message, $context);
        }
    }
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);
	}
547224
public function log($level, $message, array $context = array()) {
		$ctx = $context;
		if(!count($ctx)) {
			$ctx = new \stdClass();
		}
		$message = sprintf($this->format, $message, json_encode($ctx, $this->jsonOptions));
		$this->logger()->log($level, $message, $context);
	}
58064
private function log($level, $message, array $context = array())
    {
        if (isset($this->logger)) {
            $this->logger->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);
    }
396649
public function log($level, $message, array $context = array()) {
		$message = call_user_func($this->fn, $level, $message, $context);
		$this->logger()->log($level, $message, $context);
	}
739718
public function write($content, $level)
    {
        $this->message = (string) $content;
        $this->level   = $level;

        if ( is_callable($this->writeBeforeHandle) )
        {
            $this->writeBefore($this->writeBeforeHandle);

            if (!$this->customMessageFormatParser)
            {
                $this->defaultMessageFormatReplaces();
            }
        }
        else
        {
            $this->defaultMessageFormatReplaces();
        }

        $this->messageFormatParser();

        if ( !$this->resource )
        {
            $this->filename = date($this->dateFormat);

            if ( !empty($this->extension) )
            {
                $this->filename .= '.' . $this->extension;
            }

            $this->resource = fopen($this->path . DIRECTORY_SEPARATOR . $this->filename, 'a');
        }

        fwrite($this->resource, $this->messageOutput . PHP_EOL);
    }
727630
public function writer($level, $message)
    {
        (!empty($this->file)) ? $fileName = $this->file : $fileName = '.logs';
        $fileHandling = new FileHandling();
        $text = 'Date/time: '.date('Y-m-d h:i:s A')." , Level: $level , message: ".$message."\n";
        $file = route()->storage->log.$fileName;
        $fileHandling->open($file, 'readWriteAppend')->write($text);
        $fileHandling->close();
    }
975316
public function message($message, $level = 'info')
    {
        $this->session->create('flash_notification.message', $message);
        $this->session->create('flash_notification.level', $level);
    }
1351155
public function log($level, $message, array $context = []) : void
    {
        $prefix = '';

        if ($this->timestamps) {
            $prefix .= '[' . date(self::TIMESTAMP_FORMAT) . '] ';
        }

        $prefix .= $this->channel . '.' . strtoupper((string) $level) . ': ';

        echo $prefix . $message . PHP_EOL;
    }