AniLink - v3.0.0
    Preparing search index...

    Function reportDiagnostic

    • The single emit path for the library's unsolicited diagnostics: the hook-failure fallback and the stateOwner keying warning. Both produce a structured AniLinkDiagnostic record so platform log collectors get filterable source/kind/hookName/requestId fields instead of prose.

      Emission follows the configured DiagnosticsMode: "silent" suppresses the unsolicited output entirely; "hook" routes through onHookError only and never touches the console; "warn" routes through onHookError when configured, falling back to a console.warn of the JSON-serialized record. One exception: a diagnostic carrying a rawError (a real hook failure) always reaches a configured observer, in every mode. The modes control only the fallback. Exceptions from an observer are caught so a broken logger cannot break the request pipeline.

      Parameters

      Returns boolean

      Whether an emission happened: true when a configured observer was invoked or the record reached the console, false when the configuration suppressed the diagnostic. One-shot emitters use this result instead of reimplementing the routing, avoiding mismatches such as consuming a silent-mode warning without emitting it.