original_string: protected function _logDelivery($contents)
      {
          if (empty($this->_profile['log'])) {
              return;
          }
          $config = [
              'level' => 'debug',
              'scope' => 'email'
          ];
          if ($this->_profile['log'] !== true) {
              if (!is_array($this->_profile['log'])) {
                  $this->_profile['log'] = ['level' => $this->_profile['log']];
              }
              $config = $this->_profile['log'] + $config;
          }
          Log::write(
              $config['level'],
              PHP_EOL . $this->flatten($contents['headers']) . PHP_EOL . PHP_EOL . $this->flatten($contents['message']),
              $config['scope']
          );
      }
code: protected function _logDelivery($contents)
      {
          if (empty($this->_profile['log'])) {
              return;
          }
          $config = [
              'level' => 'debug',
              'scope' => 'email'
          ];
          if ($this->_profile['log'] !== true) {
              if (!is_array($this->_profile['log'])) {
                  $this->_profile['log'] = ['level' => $this->_profile['log']];
              }
              $config = $this->_profile['log'] + $config;
          }
          Log::write(
              $config['level'],
              PHP_EOL . $this->flatten($contents['headers']) . PHP_EOL . PHP_EOL . $this->flatten($contents['message']),
              $config['scope']
          );
      }
code_tokens: protected function _logDelivery ( $ contents ) { if ( empty ( $ this -> _profile [ 'log' ] ) ) { return ; } $ config = [ 'level' => 'debug' , 'scope' => 'email' ] ; if ( $ this -> _profile [ 'log' ] !== true ) { if ( ! is_array ( $ this -> _profile [ 'log' ] ) ) { $ this -> _profile [ 'log' ] = [ 'level' => $ this -> _profile [ 'log' ] ] ; } $ config = $ this -> _profile [ 'log' ] + $ config ; } Log :: write ( $ config [ 'level' ] , PHP_EOL . $ this -> flatten ( $ contents [ 'headers' ] ) . PHP_EOL . PHP_EOL . $ this -> flatten ( $ contents [ 'message' ] ) , $ config [ 'scope' ] ) ; }
docstring: Log the email message delivery.
  
  @param array $contents The content with 'headers' and 'message' keys.
  @return void
docstring_tokens: Log the email message delivery .