ispectify
library
Classes
AnsiPen
Pen attributes for foreground and background colors.
BaseNetworkInterceptorSettings
Base settings class for network interceptors (Dio, HTTP, etc.).
BaseNetworkInterceptorSettingsBuilder <B extends BaseNetworkInterceptorSettingsBuilder <B , TReq , TRes , TErr > , TReq , TRes , TErr >
Base builder for network interceptor settings.
CategoryFilter
Matches logs whose TraceKeys.category is in categories .
CompositeRedactionStrategy
Runs multiple strategies in order and returns the first redaction result.
ConsoleSettings
Configuration settings for ISpectLogger logger.
ConsoleUtils
Static helpers for console output: border lines and ANSI color mapping.
CorrelationFilter
Matches logs with a specific TraceKeys.correlationId .
CurlUtils
Utility class for generating cURL commands from HTTP request data.
DefaultISpectLoggerHistory
In-memory ILogHistory backed by a ListQueue .
ExtendedLoggerFormatter
Renders single-line logs verbatim and indents continuation lines of
multi-line payloads (e.g. network curl dumps, JSON bodies).
FakeISpectLogger
Test double for ISpectLogger . Captures all logs for assertions.
FileLogHistory
Extended ILogHistory with daily file-based persistence.
Filter <T >
A generic filter that checks whether a given item satisfies certain
conditions. Used as a building block for more specific filter types.
The outcome of a header redaction operation.
HttpMethodFilter <T >
Passes only events whose HTTP method is in allowedMethods .
HumanLogEntryFormatter
Human-readable, grep-friendly console output.
ILogEntryFormatter
Renders a full ISpectLogData entry into a console-ready string.
ILoggerFilter
Determines whether a log message should be recorded
based on its content and log level.
ILoggerFormatter
Converts LogDetails into a formatted string for console output.
ILogHistory
Contract for log history storage.
ISpectBaseLogger
Console logger: formats messages via ILoggerFormatter and writes
them through a LoggerOutput function.
ISpectDateTimeFormatter
A utility class for formatting DateTime objects into readable strings.
ISpectErrorHandler
A utility class for handling errors and exceptions in ISpectLogger.
ISpectFilter
Composite filter combining log-type-key, runtime type, and search criteria.
ISpectLogData
Core log entry model. All fields are immutable after construction.
ISpectLogDataJsonUtils
Utility class for ISpectLogData JSON operations.
ISpectLogError
Log entry produced when a Dart Error is captured by the logger.
ISpectLogException
Log entry produced when a Dart Exception is captured by the logger.
ISpectLogger
A customizable logging and inspection utility for mobile applications.
ISpectLoggerOptions
Configuration options for ISpectLogger logging.
ISpectLogType
Describes a log type — built-in or user-defined.
ISpectObserver
Observer for monitoring ISpectLogger events.
ISpectTraceCategory
Defines a trace category for grouping related log entries.
ISpectTraceConfig
Base configuration for trace operations.
ISpectTraceToken
Token returned by traceStart for manual span timing.
JsonTruncator
Pretty-prints JSON objects with depth and size limits.
KeyBasedRedaction
Redacts values based on key names: fully-masked keys and sensitive keys.
LogDetails
LogExporter
Utility class for batch export of log data.
LogLevelRangeFilter
Filters logs by a LogLevel range (inclusive).
LogTypeKeyFilter
Matches ISpectLogData items whose ISpectLogData.key is in keys .
NetworkFilter <T >
Base class for network filter chain units.
NetworkFilterChain <T >
Immutable, ordered chain of NetworkFilter s with short-circuit evaluation.
NetworkJsonKeys
Canonical JSON key names used across all network interceptor packages.
NetworkLogPrintOptions
Abstraction describing print preferences and color configuration for
network-related logs.
NetworkLogRenderer
Builds the verbose body section (status / payload / headers / error info)
of a network log entry from its ISpectLogData.additionalData .
NetworkMapRedactor
Standard redaction pipeline for network toJson() maps.
NetworkPayloadSanitizer
Provides reusable sanitization helpers for network payloads.
NetworkTransaction
Groups a correlated HTTP request with its response or error.
PatternBasedRedaction
Redacts values based on content patterns (tokens, JWTs, base64, binary).
RedactionContext
Provides redaction helpers and configuration to strategies at call-time.
RedactionResult
The outcome of a redaction operation: the redacted data and statistics
about what was redacted.
RedactionService
A configurable service that redacts sensitive values in headers and payloads.
RedactionStats
Lightweight counters tracking what a single redaction traversal redacted.
RedactionStrategy
Redaction strategy interface.
SamplingFilter <T >
Logs only every sampleRate -th event (1-based counting).
SearchFilter
Case-insensitive search across all fields of ISpectLogData ,
including nested ISpectLogData.additionalData .
SessionStatistics
Snapshot of session metrics and configuration.
SourceFilter
Matches logs whose TraceKeys.source is in sources .
StatusCodeFilter <T >
Passes only events whose HTTP status code satisfies predicate .
TraceCategoryIds
Single source of truth for category ID strings.
TraceKeys
Top-level keys in ISpectLogData.additionalData for trace envelope.
TransactionFilter
Matches logs with a specific TraceKeys.transactionId .
TypeFilter
Matches ISpectLogData items whose runtime type is in types .
UrlExclusionFilter <T >
Suppresses logging for URLs matching any of excludedPatterns .
Extensions
ISpectDataX
on ISpectLogData
Utility extensions on ISpectLogData : copy, formatting, cURL generation.
ISpectLogDataSerialization
on ISpectLogData
Extension for ISpectLogData to add serialization support.
ISpectLogDataX
on ISpectLogData
Convenience getters for accessing structured trace data in ISpectLogData .
ISpectLoggerAnalytics
on ISpectLogger
Trace helpers for analytics events (screen views, product impressions, etc.).
ISpectLoggerAuth
on ISpectLogger
Trace helpers for authentication flows (sign-in, sign-out, refresh, etc.).
ISpectLoggerGraphQL
on ISpectLogger
Trace helpers for GraphQL queries, mutations, and subscriptions.
ISpectLoggerGrpc
on ISpectLogger
Trace helpers for gRPC calls.
ISpectLoggerNavigation
on ISpectLogger
Trace helpers for Navigator / router transitions.
ISpectLoggerNetwork
on ISpectLogger
Trace helpers for raw HTTP request / response / error events.
ISpectLoggerPayment
on ISpectLogger
Trace helpers for payment and in-app purchase flows.
ISpectLoggerPush
on ISpectLogger
Trace helpers for push / remote notifications.
Trace helpers for Server-Sent Events (SSE) streams.
ISpectLoggerState
on ISpectLogger
Trace helpers for state-management layers (BLoC, Cubit, Riverpod, etc.).
ISpectLoggerStorage
on ISpectLogger
Trace helpers for object-storage / file-storage operations
(S3, Firebase Storage, local fs, etc.).
ISpectLoggerWs
on ISpectLogger
Trace helpers for WebSocket send / receive events.
ISpectStringExtension
on String ?
An extension on nullable String providing truncation.
ISpectTrace
on ISpectLogger
LogLevelX
on LogLevel
SafeLogExtension
on ISpectLogger
Extension on ISpectLogger providing safe logging helpers.
Functions
base64Placeholder (int length )
→ String
Placeholder for redacted Base64-encoded data, showing approximate length.
binaryPlaceholder (int length )
→ String
Placeholder for redacted binary data, preserving the original byte count.
cleanMap (Map <String , Object ? > map )
→ Map <String , Object ? >
Removes entries with null values or empty-string values from map.
containsAnsi (String value )
→ bool
Returns true if value contains any ANSI escape sequence.
formatBytes (int bytes )
→ String
Formats a byte count as a human-readable string (B, KB, MB, GB).
generateTraceId ()
→ String
Generates a 16-character hex trace ID from the current timestamp
and a random component.
normalizeStackTrace (StackTrace ? stackTrace )
→ StackTrace ?
Returns stackTrace as-is unless it is null or StackTrace.empty ,
in which case null is returned.
resetBackground ()
→ String
resetForeground ()
→ String
samplePass (double ? rate )
→ bool
Returns true when the operation should proceed based on a probabilistic
sampling rate.
stripAnsi (String value )
→ String
Returns value with all ANSI escape sequences removed.
truncateLeaves (Object ? input , {required int maxLength })
→ Object ?
Recursively truncates string leaves in nested Map /Iterable structures.
truncateStackTrace (StackTrace ? stackTrace , {int maxFrames = kDefaultStackFrameLimit })
→ StackTrace ?
Truncates stackTrace to maxFrames frames while keeping it a proper
StackTrace so that tools like Flutter DevTools can still parse and
display clickable frame links.
truncateString (String value , {int maxLength = kDefaultStringTruncateLimit })
→ String
Truncates value to maxLength, avoiding surrogate pair splits.