logIfEnabled method

  1. @protected
  2. @nonVirtual
void logIfEnabled(
  1. RxStorageLoggerEvent<Key, Options> eventProducer()
)

Log event if logging is enabled.

Implementation

@protected
@nonVirtual
void logIfEnabled(
    RxStorageLoggerEvent<Key, Options> Function() eventProducer) {
  assert(_debugAssertNotDisposed());

  if (_isLogEnabled) {
    _publishLog(eventProducer());
  }
}