log static method

void log(
  1. String tag,
  2. String message
)

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);
  }
}