forHomeDir static method

FileAgentTelemetrySink? forHomeDir(
  1. String? homeDir, {
  2. String tag = '-',
})

The canonical fa.log sink for homeDir, or null when the host has no home dir (web build, sandbox) — mirror of the CLI's own null path stance.

Implementation

static FileAgentTelemetrySink? forHomeDir(
  String? homeDir, {
  String tag = '-',
}) {
  if (homeDir == null || homeDir.isEmpty) return null;
  return FileAgentTelemetrySink('$homeDir/.fah/logs/fa.log', tag: tag);
}