<commit_before>import Foundation
import When

protocol TaskRunning: class {
  var URLRequest: NSURLRequest { get }
  var promise: Promise<Wave> { get }

  func run() -> Ride
}

extension TaskRunning {

  func process(data: NSData?, response: NSURLResponse?, error: ErrorType?) {
    if let error = error {
      promise.reject(error)
      return
    }

    guard let response = response as? NSHTTPURLResponse else {
      promise.reject(Error.NoResponseReceived)
      return
    }

    guard let data = data else {
      promise.reject(Error.NoDataInResponse)
      return
    }

    let result = Wave(data: data, request: URLRequest, response: response)
    promise.resolve(result)
  }
}<commit_msg>Log response again<commit_after>import Foundation
import When

protocol TaskRunning: class {
  var URLRequest: NSURLRequest { get }
  var promise: Promise<Wave> { get }

  func run() -> Ride
}

extension TaskRunning {

  func process(data: NSData?, response: NSURLResponse?, error: ErrorType?) {
    if let error = error {
      promise.reject(error)
      return
    }

    guard let response = response as? NSHTTPURLResponse else {
      promise.reject(Error.NoResponseReceived)
      return
    }

    if logger.enabled {
      logger.responseLogger.init(level: logger.level).logResponse(response)
    }

    guard let data = data else {
      promise.reject(Error.NoDataInResponse)
      return
    }

    let result = Wave(data: data, request: URLRequest, response: response)
    promise.resolve(result)
  }
}
{'fraction_non_alphanumeric': 0.09234828496042216, 'fraction_numerical': 0.0, 'mean_word_length': 3.111111111111111, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '101349', 'n_tokens_mistral': 446, 'n_tokens_neox': 437, 'n_words': 122}