         public static let headers:      RequestLogOptions = RequestLogOptions(rawValue: 1 << 2)
         public static let formatAscURL: RequestLogOptions = RequestLogOptions(rawValue: 1 << 3)
 
+        //Aggregate options
         public static let `default`:    RequestLogOptions = [method, headers]
         public static let verbose:      RequestLogOptions = [method, headers, body]
     }

    public init(configuration: Configuration = Configuration()) {
        self.configuration = configuration
    }

    fileprivate func outputItems(_ items: [String], _ target: TargetType) {
        //TODO: Check why we output items one by one when verbose
        /*
         if isVerbose {
         items.forEach { output(separator, terminator, target, $0) }
         } else {
         output(separator, terminator, target, items)
         }
         */
        configuration.output(target, items)
    }
}

//MARK: - PluginType
extension NetworkLoggerPlugin: PluginType {
    public func willSend(_ request: RequestType, target: TargetType) {
        if configuration.requestLoggingOptions.contains(.formatAscURL),
            let request = request as? CustomDebugStringConvertible {
            //Don't use outputItems to prevent cURL being broken with additionnal terminators insertions
            let message = newEntry(identifier: "Request", message: request.debugDescription)
            configuration.output(target, message)
            return
        }

        outputItems(logNetworkRequest(request), target)
    }

    public func didReceive(_ result: Result<Moya.Response, MoyaError>, target: TargetType) {
        switch result {
        case .success(let response):
            outputItems(logNetworkResponse(response, target: target, isFromError: false), target)
        case let .failure(error):
            outputItems(logNetworkError(error, target: target), target)
        }
    }
}

//MARK: - Utils
private extension NetworkLoggerPlugin {

    func newEntry(identifier: String, message: String) -> String {

        return "\(configuration.loggerId): [\(date)] \(identifier): \(message)"
    }


    func logNetworkRequest(_ request: RequestType, target: TargetType) -> [String] {

        //cURL formatting
        if configuration.requestLoggingOptions.contains(.formatAscURL),
            let request = request as? CustomDebugStringConvertible {
            return [newEntry(identifier: "Request", message: request.debugDescription)]
        }

        //Request presence check
        guard let httpRequest = request.request else {
            return [newEntry(identifier: "Request", message: "(invalid request)")]
        }

        // Adding log entries for each given log option
        var output = [String]()

        output.append(newEntry(identifier: "Request", message: httpRequest.description))
