log static method
Central logging method with structured AI-readable layout.
Implementation
static void log(String tag, String message) {
String logLine = '[${_timestamp()}] [$tag] $message';
if (_currentAsrBuffer.isNotEmpty) {
logLine += ' | ASR: $_currentAsrBuffer';
}
if (kIsWeb) {
// ignore: avoid_print
print(logLine);
} else {
debugPrint(logLine);
}
}