src/Message/MessageFactory.php
public function buildMessage($level, string $message, array $context = []): MessageInterface
    {
        $level = $this->validateSeverity($level);
        $data = [
            MessageInterface::CONTEXT => []
        ];

        // Append message defaults to this payload
        $data = $this->consume($data, $this->logProperties);

        // Append message context to this payload
        $data = $this->consume($data, $context);

        return new Message($level, $message, $data);
    }
public function buildMessage($level, string $message, array $context = []): MessageInterface
    {
        $level = $this->validateSeverity($level);
        $data = [
            MessageInterface::CONTEXT => []
        ];

        // Append message defaults to this payload
        $data = $this->consume($data, $this->logProperties);

        // Append message context to this payload
        $data = $this->consume($data, $context);

        return new Message($level, $message, $data);
    }
public function buildMessage ( $ level , string $ message , array $ context = [ ] ) : MessageInterface { $ level = $ this -> validateSeverity ( $ level ) ; $ data = [ MessageInterface :: CONTEXT => [ ] ] ; // Append message defaults to this payload $ data = $ this -> consume ( $ data , $ this -> logProperties ) ; // Append message context to this payload $ data = $ this -> consume ( $ data , $ context ) ; return new Message ( $ level , $ message , $ data ) ; }
Sanitize and instantiate a Message

@param mixed $level
@param string $message
@param array $context

@return Message
Sanitize and instantiate a Message