0001 // 0002 // Observable+Debug.swift 0003 // RxSwift 0004 // 0005 // Created by Krunoslav Zaher on 5/2/15. 0006 // Copyright © 2015 Krunoslav Zaher. All rights reserved. 0007 // 0008 0009 import Foundation 0010 0011 // MARK: debug 0012 0013 extension ObservableType { 0014 0015 /** 0016 Prints received events for all observers on standard output. 0017 0018 - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) 0019 0020 - parameter identifier: Identifier that is printed together with event description to standard output. 0021 - returns: An observable sequence whose events are printed to standard output. 0022 */ 0023 @warn_unused_result(message="http://git.io/rxs.uo") 0024 public func debug(identifier: String? = nil, file: String = __FILE__, line: UInt = __LINE__, function: String = __FUNCTION__) 0025 -> Observable<E> { 0026 return Debug(source: self.asObservable(), identifier: identifier, file: file, line: line, function: function) 0027 } 0028 }