ISpectWSInterceptorSettings class
WebSocket interceptor settings.
Extends BaseNetworkInterceptorSettings to reuse shared fields
(enabled, enableRedaction, pens, print toggles) while providing
WS-specific convenience aliases (printSentData, sentPen, etc.).
v5.0 breaking change: Filter function signatures changed from
typed log subclasses to ISpectLogData. Filters now receive the
actual log data instead of null.
Constructors
-
ISpectWSInterceptorSettings({bool enabled = true, bool enableRedaction = true, bool printReceivedData = true, bool printReceivedMessage = true, bool printErrorData = true, bool printErrorMessage = true, bool printSentData = true, bool printReceivedHeaders = false, bool printSentHeaders = false, AnsiPen? sentPen, AnsiPen? receivedPen, AnsiPen? errorPen, @Deprecated('Use sentChain instead. Will be removed in 7.0.0.') bool sentFilter(ISpectLogData data)?, @Deprecated('Use receivedChain instead. Will be removed in 7.0.0.') bool receivedFilter(ISpectLogData data)?, @Deprecated('Use errorChain instead. Will be removed in 7.0.0.') bool errorFilter(ISpectLogData data)?, NetworkFilterChain<
ISpectLogData> ? sentChain, NetworkFilterChain<ISpectLogData> ? receivedChain, NetworkFilterChain<ISpectLogData> ? errorChain}) -
const
Properties
- enabled → bool
-
Enable HTTP request/response logging when
true.finalinherited - enableRedaction → bool
-
Enable sensitive data redaction when
true(default:true).finalinherited -
errorChain
→ NetworkFilterChain<
ISpectLogData> ? -
Filter chain for errors. Takes priority over errorFilter.
final
- errorFilter → bool Function(ISpectLogData data)?
-
Filter for error events. Return
falseto suppress logging.final - errorPen → AnsiPen?
-
Custom
AnsiPenfor error log console output.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- printErrorData → bool
-
Print error body in the log message.
finalinherited
- printErrorHeaders → bool
-
Print error headers in the log message.
finalinherited
- printErrorMessage → bool
-
Print error status message in the log message.
finalinherited
- printReceivedData → bool
-
no setter
- printReceivedHeaders → bool
-
no setter
- printReceivedMessage → bool
-
no setter
- printRequestData → bool
-
Print request body in the log message.
finalinherited
- printRequestHeaders → bool
-
Print request headers in the log message.
finalinherited
- printResponseData → bool
-
Print response body in the log message.
finalinherited
- printResponseHeaders → bool
-
Print response headers in the log message.
finalinherited
- printResponseMessage → bool
-
Print response status message in the log message.
finalinherited
- printSentData → bool
-
no setter
- printSentHeaders → bool
-
no setter
-
receivedChain
→ NetworkFilterChain<
ISpectLogData> ? -
Filter chain for received messages. Takes priority over receivedFilter.
final
- receivedFilter → bool Function(ISpectLogData data)?
-
Filter for received messages. Return
falseto suppress logging.final - receivedPen → AnsiPen?
-
no setter
- requestPen → AnsiPen?
-
Custom
AnsiPenfor request log console output.finalinherited - responsePen → AnsiPen?
-
Custom
AnsiPenfor response log console output.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sentChain
→ NetworkFilterChain<
ISpectLogData> ? -
Filter chain for sent messages. Takes priority over sentFilter.
final
- sentFilter → bool Function(ISpectLogData data)?
-
Filter for sent messages. Return
falseto suppress logging.final - sentPen → AnsiPen?
-
no setter
Methods
-
copyWith(
{bool? enabled, bool? enableRedaction, bool? printSentData, bool? printSentHeaders, bool? printReceivedData, bool? printReceivedHeaders, bool? printReceivedMessage, bool? printErrorData, bool? printErrorMessage, AnsiPen? sentPen, AnsiPen? receivedPen, AnsiPen? errorPen, bool? printRequestData, bool? printRequestHeaders, bool? printResponseData, bool? printResponseHeaders, bool? printResponseMessage, AnsiPen? requestPen, AnsiPen? responsePen, bool? printErrorHeaders, bool sentFilter(ISpectLogData data)?, bool receivedFilter(ISpectLogData data)?, bool errorFilter(ISpectLogData data)?, NetworkFilterChain< ISpectLogData> ? sentChain, NetworkFilterChain<ISpectLogData> ? receivedChain, NetworkFilterChain<ISpectLogData> ? errorChain}) → ISpectWSInterceptorSettings - Creates a copy with updated values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldProcessError(
ISpectLogData value) → bool -
Returns
truewhen the error should be logged. -
shouldProcessReceived(
ISpectLogData value) → bool -
Returns
truewhen the received message should be logged. -
shouldProcessSent(
ISpectLogData value) → bool -
Returns
truewhen the sent message should be logged. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited