output method
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 debug
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 in debug
builds. In release
builds it
is always an empty array.
Implementation
void output({required int level, required String message, required List<dynamic> debug}) {
var text = "[${DescopeSdk.name}] $message";
if (debug.isNotEmpty) {
text += " (${debug.map((v) => v.toString()).join(", ")})";
}
// ignore: avoid_print
print(text);
}