original_string: public function formatLog(array $logMessage) {
          extract($logMessage);
  
          $level = strtoupper($level);
          $message = $this->applyContext($message, $context);
          $timestamp = date($this->dateTimeFormat, $timestamp);
          $exception = $this->getExceptionTrace($context);
  
          $log = str_replace(self::FORMAT_TIMESTAMP, $timestamp, $this->logFormat);
          $log = str_replace(self::FORMAT_LEVEL, $level, $log);
          $log = str_replace(self::FORMAT_MESSAGE, $message, $log);
          $log = str_replace(self::FORMAT_EXCEPTION, $exception, $log);
  
          return $log;
      }
code: public function formatLog(array $logMessage) {
          extract($logMessage);
  
          $level = strtoupper($level);
          $message = $this->applyContext($message, $context);
          $timestamp = date($this->dateTimeFormat, $timestamp);
          $exception = $this->getExceptionTrace($context);
  
          $log = str_replace(self::FORMAT_TIMESTAMP, $timestamp, $this->logFormat);
          $log = str_replace(self::FORMAT_LEVEL, $level, $log);
          $log = str_replace(self::FORMAT_MESSAGE, $message, $log);
          $log = str_replace(self::FORMAT_EXCEPTION, $exception, $log);
  
          return $log;
      }
code_tokens: public function formatLog ( array $ logMessage ) { extract ( $ logMessage ) ; $ level = strtoupper ( $ level ) ; $ message = $ this -> applyContext ( $ message , $ context ) ; $ timestamp = date ( $ this -> dateTimeFormat , $ timestamp ) ; $ exception = $ this -> getExceptionTrace ( $ context ) ; $ log = str_replace ( self :: FORMAT_TIMESTAMP , $ timestamp , $ this -> logFormat ) ; $ log = str_replace ( self :: FORMAT_LEVEL , $ level , $ log ) ; $ log = str_replace ( self :: FORMAT_MESSAGE , $ message , $ log ) ; $ log = str_replace ( self :: FORMAT_EXCEPTION , $ exception , $ log ) ; return $ log ; }
docstring: Format log message
  @param  array  $logMessage An array with key `timestamp`, 'level', 'message', and 'context'
  @return string
docstring_tokens: Format log message