NetworkRequestLog class

Inheritance
Available extensions

Constructors

NetworkRequestLog(Object? message, {required String? method, required String? url, required String? path, required NetworkLogPrintOptions settings, Map<String, dynamic>? headers, Object? body, String? logKey, Map<String, dynamic>? metadata, AnsiPen? pen})

Properties

additionalData Map<String, dynamic>?
Additional metadata associated with the log entry.
finalinherited
body Object?
final
curlCommand String?

Available on ISpectLogData, provided by the ISpectDataX extension

Generates a cURL command for HTTP logs (request, response, or error).
no setter
error Error?
Any error associated with the log entry.
finalinherited
errorText String?
Returns the error as a string if available, otherwise an empty string.
no setterinherited
exception Object?
Any exception associated with the log entry.
finalinherited
exceptionText String?
Returns the exception as a string if available, otherwise an empty string.
no setterinherited
formattedTime String
Returns the formatted timestamp of the log entry.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
Returns a formatted log header including the title or key and timestamp.
no setterinherited
headers Map<String, dynamic>?
final
httpLogText String?

Available on ISpectLogData, provided by the ISpectDataX extension

Extracts the error message for logging.
no setter
isError bool
no setterinherited
isHttpLog bool

Available on ISpectLogData, provided by the ISpectDataX extension

Checks if this log entry is related to HTTP requests.
no setter
isRouteLog bool

Available on ISpectLogData, provided by the ISpectDataX extension

no setter
key String?
A unique identifier for the log entry.
finalinherited
logKey String
final
logLevel LogLevel?
The severity level of the log entry.
finalinherited
message String?
The main log message.
finalinherited
messageText String
Returns the log message as a string, or an empty string if null.
no setterinherited
method String?
final
path String?
final
pen AnsiPen?
ANSI color styling for the log message.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings NetworkLogPrintOptions
final
stackTrace StackTrace?
The stack trace associated with the log entry.
finalinherited
stackTraceLogText String?

Available on ISpectLogData, provided by the ISpectDataX extension

Extracts stack trace text for logging.
no setter
stackTraceText String?
Returns the formatted stack trace if available, otherwise an empty string.
no setterinherited
textMessage String
Returns the full message, including error/exception and stack trace if available.
no setteroverride
time DateTime
Returns the timestamp of the log.
no setterinherited
title String?
An optional title for categorizing the log.
finalinherited
typeText String?

Available on ISpectLogData, provided by the ISpectDataX extension

Retrieves the type of exception or error, if applicable.
no setter
url String?
final

Methods

copy() ISpectLogData

Available on ISpectLogData, provided by the ISpectDataX extension

Creates an exact duplicate of this ISpectLogData instance.
copyWith({Object? message, LogLevel? logLevel, Object? exception, Error? error, String? title, StackTrace? stackTrace, DateTime? time, AnsiPen? pen, String? key, Map<String, dynamic>? additionalData}) ISpectLogData

Available on ISpectLogData, provided by the ISpectDataX extension

Returns a copy of this ISpectLogData with optional new values.
generateText() String

Available on ISpectLogData, provided by the ISpectDataX extension

Generates a formatted summary text for logging.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyObserver(ISpectObserver observer) → void
Notifies the observer about this log entry.
inherited
toJson({bool truncated = false}) Map<String, dynamic>

Available on ISpectLogData, provided by the ISpectLogDataSerialization extension

Converts the log data into a JSON representation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited