logPrinting property

bool get logPrinting

If true, the log contents will be output on the debug console and system log.

Implementation

bool get logPrinting => _rootLogPrintSubscription != null;
set logPrinting (bool value)

Implementation

set logPrinting(bool value) {
  if (value) {
    _rootLogPrintSubscription ??= Logger.root.onRecord.listen(
      _onRootLogRecordPrint,
    );

    if (debugPrint == _debugLogMuter) {
      debugPrint = _originalDebugPrint!;
    }
  } else {
    _rootLogPrintSubscription?.cancel();
    _rootLogPrintSubscription = null;

    if (debugPrint != _debugLogMuter) {
      _originalDebugPrint = debugPrint;
      debugPrint = _debugLogMuter;
    }
  }
}