Add a log entry

@param  string $type
@param  string $msg
@param  array  $context
@return void
161525
protected function add($type, $msg, array $context)
	{
		if (!isset($context['attrName']) && isset($this->attrName))
		{
			$context['attrName'] = $this->attrName;
		}

		if (!isset($context['tag']) && isset($this->tag))
		{
			$context['tag'] = $this->tag;
		}

		$this->logs[] = [$type, $msg, $context];
	}
882112
protected function log($level, $mesg, $context = array())
    {
        if ($logger = $this->getLogger()) {
            $context = array_merge($this->getDefaultContext(), $context);
            $logger->log($level, $mesg, $context);
        }
    }
1024637
public function log($msg, $timestamp = true)
    {
        if ($timestamp) {
            $timestamp = strftime("%Y-%m-%d %H:%M:%S");
            $msg = "[{$timestamp}] {$msg}";
        }
        $this->addResult($msg);
        if ($this->verbose) echo $msg . PHP_EOL;
    }
889152
public function addDebug($message, array $context = array())
    {
        return $this->_instance->addRecord(\Monolog\Logger::DEBUG, $message, $context);
    }
903001
public function log($level, $message, array $context = [])
    {
        // convert level to syslog level
        $syslogPriority = self::levelToPriority($level);

        syslog(
            $syslogPriority,
            $message
        );
    }
231755
public static function log($msg, $mod = null, $file = 0, $line = 0)
    {
        self::logInfo($msg, $mod, $file, $line);
    }
166006
public function log($level, $message, array $context = array())
    {
        foreach ($this->loggerInstances as $logger) {
            $logger->log($level, $message, $context);
        }
    }
1094530
public function log($msg)
    {
        $agi = $this->getAgi();
        $this->logger->debug($msg);
        $agi->consoleLog($msg);
    }
398845
public function log($type = null, $data = [])
    {
        if (!func_num_args()) {
            return $this->_log;
        }
        $this->report($type, $this->log()->add($type, $data));
    }
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();
		}
	}
1344631
public function log($level, $message, array $context = array()) {
		$message = preg_replace("/[\r\n]+/", $this->replacement, $message);
		$this->logger()->log($level, $message, $context);
	}
1309244
public function addMessage($message, $type) {
		if (isset($_SESSION[$this->sessionKey]))
		{
			$messages = $_SESSION[$this->sessionKey];
		}
		
		$messages[] = [
			'message' => $message,
			'type' => $type,
		];
		
		$_SESSION[$this->sessionKey] = $messages;
	}
401237
protected function log($level, $message, array $context = array())
    {
        if (null === $this->logger && $this->getServiceManager()->has('logger')) {
            $this->logger = $this->getServiceManager()->get('logger');
        }

        if ($this->logger) {
            $this->logger->log($level, $message, $context);
        }
    }
326249
function write($level,$text,$context = []){
		if(isset($this->log[$level])){
		
			$log = $this->log[$level];

			$log->addRecord($level,$text,$context);
		}
	}
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);
	}
412667
public function record($msg, $type = 'info', array $context = [])
    {
        if (is_string($msg)) {
            $replace = [];
            foreach ($context as $key => $val) {
                $replace['{' . $key . '}'] = $val;
            }

            $msg = strtr($msg, $replace);
        }

        $this->log[$type][] = $msg;

        if (PHP_SAPI == 'cli') {
            // 命令行日志实时写入
            $this->save();
        }

        return $this;
    }
1326699
public function pushLog($message, array $context = [])
    {
        if ($this->logFile) {
            Log::getInstance([
                'channel' => 'SQL',
                'level' => 'info',
                'maxSize' => 1000000, // default
            ])->pushInfo($message, $context);
        }
    }