original_string: protected function _format($data, array $context = [])
      {
          if (is_string($data)) {
              return $data;
          }
  
          $isObject = is_object($data);
  
          if ($isObject && $data instanceof EntityInterface) {
              return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
          }
  
          if ($isObject && method_exists($data, '__toString')) {
              return (string)$data;
          }
  
          if ($isObject && $data instanceof JsonSerializable) {
              return json_encode($data, JSON_UNESCAPED_UNICODE);
          }
  
          return print_r($data, true);
      }
code: protected function _format($data, array $context = [])
      {
          if (is_string($data)) {
              return $data;
          }
  
          $isObject = is_object($data);
  
          if ($isObject && $data instanceof EntityInterface) {
              return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
          }
  
          if ($isObject && method_exists($data, '__toString')) {
              return (string)$data;
          }
  
          if ($isObject && $data instanceof JsonSerializable) {
              return json_encode($data, JSON_UNESCAPED_UNICODE);
          }
  
          return print_r($data, true);
      }
code_tokens: protected function _format ( $ data , array $ context = [ ] ) { if ( is_string ( $ data ) ) { return $ data ; } $ isObject = is_object ( $ data ) ; if ( $ isObject && $ data instanceof EntityInterface ) { return json_encode ( $ data , JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT ) ; } if ( $ isObject && method_exists ( $ data , '__toString' ) ) { return ( string ) $ data ; } if ( $ isObject && $ data instanceof JsonSerializable ) { return json_encode ( $ data , JSON_UNESCAPED_UNICODE ) ; } return print_r ( $ data , true ) ; }
docstring: Converts to string the provided data so it can be logged. The context
  can optionally be used by log engines to interpolate variables
  or add additional info to the logged message.
  
  @param mixed $data The data to be converted to string and logged.
  @param array $context Additional logging information for the message.
  @return string
docstring_tokens: Converts to string the provided data so it can be logged . The context can optionally be used by log engines to interpolate variables or add additional info to the logged message .