output method

void output({
  1. required int level,
  2. required String message,
  3. required List values,
})

Formats the log message and prints it.

Override this method to customize how to handle log messages from the Descope SDK. The message parameter is guaranteed to be a constant compile-time string, so you can assume it doesn't contain private user data or secrets and that it can be sent to whatever logging target or service you use. The values array has runtime values that might be useful when debugging issues with the Descope SDK. Since it might contain sensitive information its contents are only provided when unsafe is set to true. Otherwise it is always an empty array.

Implementation

void output({required int level, required String message, required List<dynamic> values}) {
  var text = "[${DescopeSdk.name}] $message";
  if (values.isNotEmpty) {
    text += " (${values.map((v) => v.toString()).join(", ")})";
  }
  // ignore: avoid_print
  print(text);
}