log method
Implementation
Stream<T> log({
String? tag,
String Function(T value)? formatter,
}) {
return doOnData((value) {
final message = formatter?.call(value) ?? '$tag: Received - $value';
RxLogger.log(message);
}).doOnCancel(() {
RxLogger.log('$tag: Cancelled');
}).doOnDone(() {
RxLogger.log('$tag: Done');
}).doOnError((error, stackTrace) {
RxLogger.logError(error, stackTrace);
});
}