API reference › @evolu/common › local‑first/Shared › postConsoleEntry

function postConsoleEntry(
  channel: BroadcastChannel<ConsoleEntryOrError>,
  entry: ConsoleEntry,
): void;

Defined in: packages/common/src/local-first/Shared.ts:504

Posts a ConsoleEntry to tabs on a channel named consoleEntryOrErrorBroadcastChannelName.

An argument that cannot be structured-cloned is replaced: an Error by the plain object createUnknownError makes of it, and any other value, such as an object holding a function, by a string. Logging such a value in a worker therefore does not throw.