Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Jan 31, 2021
1 parent 4453a75 commit d14724d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/src/debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,28 @@ extension on String {
}
}

/// RxDart debug operator - Port from [RxSwift Debug Operator](https://github.com/ReactiveX/RxSwift/blob/main/RxSwift/Observables/Debug.swift)
///
/// Prints received events for all listeners on standard output.
extension DebugStreamExtension<T> on Stream<T> {
/// RxDart debug operator - Port from [RxSwift Debug Operator](https://github.com/ReactiveX/RxSwift/blob/main/RxSwift/Observables/Debug.swift)
///
/// Prints received events for all listeners on standard output.
///
/// The [identifier] is printed together with event description to standard output.
/// If [identifier] is null, it will be current stacktrace, including location, line and member.
///
/// If [log] is null, this [Stream] is returned without any transformations.
/// This is useful for disabling logging in release mode of an application.
///
/// If [trimOutput] is true, event text will be trimmed to max 40 characters.
Stream<T> debug({
String? identifier,
void Function(String)? log = print,
bool trimOutput = false,
}) {
if (log == null) {
// logging is disabled
// logging is disabled.
return this;
}

Expand Down

0 comments on commit d14724d

Please sign in to comment.