Add Message to WebServer Log

@param string      $type    Message Type
@param null|string $message Message String
964422
private function coreAddLog($type, $message)
    {
        //====================================================================//
        // Safety Check
        if (is_null($message)) {
            return;
        }
        //====================================================================//
        // Initialise buffer if unset
        if (!isset($this->{$type})) {
            $this->{$type} = array();
        }
        //====================================================================//
        // Build Prefix
        $prefix = empty($this->prefix) ? '' : '['.$this->prefix.'] ';
        //====================================================================//
        // Add text message to buffer
        array_push($this->{$type}, $prefix.$message);
    }
1242953
public function set($type, $message)
    {

        $type = in_array($type, $this->types) ? $type : self::TYPE_INFO;

        self::$messages[$type][] = $message;
        $this->sessionDriver->set('_messages_', self::$messages);
        return $this;
    }
593321
public function log($message,$type="error",$prefix="err")
    {
        //msg
        $msg="time:".(string)date("Y-m-d H:i:s")."\r\n";
        $msg.="type:".$type."\r\n";
        $msg.="addr:".$_SERVER["REMOTE_ADDR"]."\r\n";
        $msg.="uri:".$_SERVER["REQUEST_URI"]."\r\n";
        $msg.="desc:".$message;
        $msg.="\r\n------------------------------------------------------------------------------------\r\n";

        //path
        $path=$this->getLogDir();
        $fn=Path::combinePath($path,str_replace(" ","_",$prefix)."_".(string)date("Ymd").".log");
        $fp=@fopen($fn,"ab");
        @fwrite($fp,$msg);
        @fclose($fp);
    }
520078
private function createMessageObject(string $type, string $message): Notification
    {
        $msg = new Notification();

        $msg->setType($type);
        $msg->setMessage($message);

        $this->handler->add($msg);

        return $msg;
    }
532035
protected function addMessage($message = '', $type = 'info')
    {
        $type = strip_tags($type);

        if (empty($message) || ! in_array($type, $this->types)) {
            return $this;
        }

        if ( ! array_key_exists($type, $_SESSION[$this->key])) {
            $_SESSION[$this->key][$type] = [];
        }

        $_SESSION[$this->key][$type][] = $message;

        return $this;
    }
828628
public function alert($message, $type = 'info') 
	{
		Argument::i()
			->test(2, 'string')
			->test(3, 'string');

		return Alert::i($message, $type);
	}
100586
public function setMessage($message, $type = 'info', $global = false)
    {
        //if ajax send back the message
        //in the header
        if ($this->getRequest()->isAjax()) {
            $this->getResponse()
            ->setHeader('X-Message', json_encode(array(
                'text' => AnTranslator::_($message),
                'type' => $type
            )));
        } else {
            $this->storeValue('message', array('type' => $type, 'message' => $message), $global);
        }
    }
885114
public function flash($message = null, $type = null) {
		if ($message !== null) $this->attributes['message'] = (array) $message;
		if ($type !== null) $this->attributes['type'] = $type;

		$this->session->flash('notifier', $this->attributes);
	}
558669
public function message($message, $type = 'line')
    {
        if (! is_null($this->command)) {
            $this->command->{$type}($message);
        }
    }
322784
public function addMessage($message, $type = 'success')
    {
        Events::dispatch('onMessageDisplay', array('message' => $message, 'type' => $type));
        $this->messages[] = array('message' => $message, 'type' => $type);
    }
1341351
protected function message($message = null, array $params = null, $type = 'message')
    {
        return is_array($params) ? strtr(isset($this->$type) ? $this->$type : $message, $params) : $message;
    }
63302
public function addMessage($m, $type = 'info')
    {
        if (!Any::isStr($m) || !Any::isStr($type)) {
            return;
        }

        $m = App::$Security->secureHtml($m);
        try {
            $mCollector = $this->bar->getCollector('messages');

            if (method_exists($mCollector, $type)) {
                $this->bar->getCollector('messages')->{$type}($m);
            }
        } catch (\Exception $e) {
        } // mute exceptions there
    }
256643
public function add($message = null, $type = 'notice')
    {
        if (!isset($this->messages[$type]) || !is_array($this->messages[$type])) {
            $this->messages[$type] = [];
        }
        if ($message) {
            $this->messages[$type][] = $message;
        }
        $this->writeToSession();
        return $this;
    }
215192
public function error($type, $message)
    {    
        $error = array(
            E_WARNING      => 'Warning',
            E_NOTICE       => 'Notice',
            E_USER_ERROR   => 'Error',
            E_USER_WARNING => 'Warning',
            E_USER_NOTICE  => 'Notice',
        );

        if (isset($error[$type])) {
            $this->error[] = $error[$type].': '.$message;
        }

        return true;
    }
98031
public function addLogProcessor($type)
    {
        switch ($type) {
            case 'web':
                $this->pushProcessor(new WebProcessor());
                break;

            case 'intro':
            case 'introspection':
                $this->pushProcessor(new IntrospectionProcessor());
                break;

            default:
                throw new \Exception('Unknown Log Processor', 1);
                break;
        }
    }
406966
public function add($message, $type = 'error')
    {
        $this->session[$this->prefix][] = ['message' => $message, 'type' => $type];

        return $this;
    }
6181
public function addMessage($type, $content)
	{
		if($this->session->has('Cfmessage')) {
			$messages = $this->session->get('Cfmessage', []);
		}
		
		$messages[] = [
			'content' => $content,
			'type' => $type,
		];
		
		$this->session->set('Cfmessage', $messages);
	}