public function format(LogMessageInterface $logMessage)
    {

        // initialize the parameters for the formatted message
        $params = array(
            date($this->dateFormat),
            gethostname(),
            $logMessage->getLevel(),
            $this->convertToString($logMessage),
            json_encode($logMessage->getContext())
        );

        // format, trim and return the message
        return trim(vsprintf($this->messageFormat, $params));
    }
public function format(LogMessageInterface $logMessage)
    {

        // initialize the parameters for the formatted message
        $params = array(
            date($this->dateFormat),
            gethostname(),
            $logMessage->getLevel(),
            $this->convertToString($logMessage),
            json_encode($logMessage->getContext())
        );

        // format, trim and return the message
        return trim(vsprintf($this->messageFormat, $params));
    }
public function format ( LogMessageInterface $ logMessage ) { // initialize the parameters for the formatted message $ params = array ( date ( $ this -> dateFormat ) , gethostname ( ) , $ logMessage -> getLevel ( ) , $ this -> convertToString ( $ logMessage ) , json_encode ( $ logMessage -> getContext ( ) ) ) ; // format, trim and return the message return trim ( vsprintf ( $ this -> messageFormat , $ params ) ) ; }
Formats and returns a string representation of the passed log message.

@param \AppserverIo\Logger\LogMessageInterface $logMessage The log message we want to format

@return string The formatted string representation for the log messsage
Formats and returns a string representation of the passed log message .