TelemetryLogger class

A telemetry logger which can be used by extensions to log usage and error telementry.

A logger wraps around an {@link TelemetrySendersender} but it guarantees that

  • user settings to disable or tweak telemetry are respected, and that
  • potential sensitive data is removed

It also enables an "echo UI" that prints whatever data is send and it allows the editor to forward unhandled errors to the respective extensions.

To get an instance of a TelemetryLogger, use {@link env.createTelemetryLoggercreateTelemetryLogger}.

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

TelemetryLogger({Event<TelemetryLogger>? onDidChangeEnableStates, bool? isUsageEnabled, bool? isErrorsEnabled, void logUsage(String, [dynamic])?, void dispose()?})
factory

Properties

dispose ↔ void Function()

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isErrorsEnabled bool

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

Whether or not error telemetry is enabled for this logger.
no setter
isUsageEnabled bool

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

Whether or not usage telemetry is enabled for this logger.
no setter
logError → ({void Function(String eventName, [dynamic data]) $1, void Function(Error error, [dynamic data]) $2})

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

Overload accessor: $1, $2
no setter
logUsage ↔ void Function(String, [dynamic])

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

getter/setter pair
onDidChangeEnableStates Event<TelemetryLogger>

Available on TelemetryLogger, provided by the TelemetryLogger$Typings extension

An {@link Event} which fires when the enablement state of usage or error telemetry changes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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