InfospectLog constructor
InfospectLog({
- DiagnosticLevel level = DiagnosticLevel.info,
- DateTime? timestamp,
- required String message,
- dynamic error,
- StackTrace? stackTrace,
Creates an instance of the InfospectLog class.
Parameters:
level: The log level indicating the severity of the log (default is DiagnosticLevel.info).timestamp: The timestamp when the log was created (default is the current time).message: The log message.error: The error associated with the log (optional).stackTrace: The stack trace associated with the log (optional).
Implementation
InfospectLog({
this.level = DiagnosticLevel.info,
DateTime? timestamp,
required this.message,
this.error,
this.stackTrace,
}) : assert(timestamp == null || !timestamp.isUtc),
timestamp = timestamp ?? DateTime.now();