AliceLog constructor

AliceLog({
  1. required String message,
  2. DiagnosticLevel level = DiagnosticLevel.info,
  3. DateTime? timestamp,
  4. dynamic error,
  5. StackTrace? stackTrace,
})

Implementation

AliceLog({
  required this.message,
  this.level = DiagnosticLevel.info,
  DateTime? timestamp,
  this.error,
  this.stackTrace,
})  : assert(
          level != DiagnosticLevel.off,
          "`DiagnosticLevel.off` is a '[special] level indicating that no "
          "diagnostics should be shown' and should not be used as a value."),
      assert(timestamp == null || !timestamp.isUtc, 'Invalid timestamp'),
      timestamp = timestamp ?? DateTime.now();