ISpectLogType class final

Describes a log type - built-in or user-defined.

Built-in types are exposed as static const fields (e.g. ISpectLogType.httpRequest). Custom types are created the same way:

const firebaseRead = ISpectLogType(
  'firebase-read',
  category: 'firebase',
  level: LogLevel.debug,
  title: 'Firebase Read',
);

Register custom types with the UI filter via ISpectTheme.customLogTypes. Set colors and icons per-key via ISpectTheme.logColors / ISpectTheme.logIcons. Category labels go in ISpectTheme.categoryLabels.

Annotations

Constructors

ISpectLogType(String key, {String category = TraceCategoryIds.general, bool isError = false, LogLevel level = LogLevel.info, String? title})
const

Properties

category → String
Category ID for grouping in the filter UI. May be any string. Built-in IDs live in TraceCategoryIds.
final
defaultPen → AnsiPen
Built-in ANSI console color for this log type.
no setter
displayTitle → String
Human-readable display title.
no setter
hashCode → int
The hash code for this object.
no setteroverride
isError → bool
Whether logs of this type represent an error condition.
final
key → String
Unique string identifier used throughout the pipeline (e.g. 'http-request').
final
level → LogLevel
Severity level used when this type is passed to ISpectLogger.log.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String?
Human-readable display name shown in filter chips. Falls back to a formatted version of key when null (e.g. 'http-request' → 'Http Request').
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
Two types are equal when their key matches.
override

Static Properties

keys → Set<String>
Set of all built-in type keys.
no setter

Static Methods

fromKey(String key) → ISpectLogType?
Looks up a built-in type by its key. Returns null for unknown keys.
fromLogLevel(LogLevel? logLevel) → ISpectLogType
Returns the canonical built-in type for logLevel. Defaults to debug when logLevel is null.
isErrorKey(String? key) → bool
Returns true if key belongs to a built-in error type.

Constants

analytics → const ISpectLogType
authError → const ISpectLogType
authSuccess → const ISpectLogType
blocClose → const ISpectLogType
blocCreate → const ISpectLogType
blocDone → const ISpectLogType
blocError → const ISpectLogType
blocEvent → const ISpectLogType
blocState → const ISpectLogType
blocTransition → const ISpectLogType
builtIn → const List<ISpectLogType>
All built-in log types. Used for filter UI and key discovery.
critical → const ISpectLogType
dbError → const ISpectLogType
dbQuery → const ISpectLogType
dbResult → const ISpectLogType
debug → const ISpectLogType
error → const ISpectLogType
exception → const ISpectLogType
good → const ISpectLogType
graphqlError → const ISpectLogType
graphqlRequest → const ISpectLogType
graphqlResponse → const ISpectLogType
grpcError → const ISpectLogType
grpcRequest → const ISpectLogType
grpcResponse → const ISpectLogType
httpError → const ISpectLogType
httpRequest → const ISpectLogType
httpResponse → const ISpectLogType
info → const ISpectLogType
paymentError → const ISpectLogType
paymentSuccess → const ISpectLogType
performanceError → const ISpectLogType
performanceJank → const ISpectLogType
print → const ISpectLogType
provider → const ISpectLogType
pushError → const ISpectLogType
pushReceived → const ISpectLogType
pushSent → const ISpectLogType
riverpodAdd → const ISpectLogType
riverpodDispose → const ISpectLogType
riverpodFail → const ISpectLogType
riverpodUpdate → const ISpectLogType
route → const ISpectLogType
sseError → const ISpectLogType
sseReceived → const ISpectLogType
stateChange → const ISpectLogType
stateError → const ISpectLogType
storageError → const ISpectLogType
storageQuery → const ISpectLogType
storageResult → const ISpectLogType
verbose → const ISpectLogType
warning → const ISpectLogType
wsError → const ISpectLogType
wsReceived → const ISpectLogType
wsSent → const ISpectLogType
wsState → const ISpectLogType