API reference › @evolu/common › Console › createNativeConsoleOutput

function createNativeConsoleOutput(): ConsoleOutput;

Defined in: packages/common/src/Console.ts:472

Creates a ConsoleOutput that writes to globalThis.console.

Pure transport - just calls the native console method with the entry args. Use createConsoleFormatter with ConsoleConfig.formatter for timestamps and path prefixes.

Trace entries are written with native console.debug, because native console.trace prints a stack trace with every call.

Example

import {
  assertType,
  createNativeConsoleOutput,
  type ConsoleOutput,
} from "@evolu/common";

const output = createNativeConsoleOutput();

assertType<typeof output, ConsoleOutput>();