Console logs

Every console.log, console.warn, console.error, and console.info piped into the session timeline.

What's captured

FieldExample
Levellog / info / warn / error
Message"checkout_started"
Arguments[{ amount: 49_990 }, "TZS"]
Timestamp1700000000000
Stack traceOnly for error level

Arguments are serialized via JSON.stringify with a safe replacer (circular refs become [Circular], functions become [Function: name], DOM nodes become their outer HTML).

How the patching works

At init, the SDK wraps console.log/info/warn/error with a thin proxy. The original function still runs (your logs still appear in the browser devtools), and a copy is pushed to the buffer.

const original = console.log;
console.log = (...args) => {
  buffer.push({ type: "console_log", level: "log", args });
  original.apply(console, args);
};

Turning it off

<GalachaProvider projectKey="..." captureConsole={false} />

On React Native:

Galacha.init({ projectKey: "...", captureConsole: false });

Why you'd turn it off

  • Chatty apps: if your app logs hundreds of debug messages per session, you'll burn the event buffer and hit the 10k overflow limit faster
  • Sensitive data in logs: if your team has a habit of logging full request payloads, turning this off avoids shipping them to our storage. Better: fix the habit. Use [redacted] for sensitive fields.
  • Production: some teams strip console.log at build time anyway. Turning off capture is redundant in that case.

The console panel in the dashboard

Press C during replay. You see:

  • A live console tail aligned to the timeline
  • Color-coded levels (red errors, yellow warnings, gray logs)
  • Click a line to jump the scrubber to that moment
  • Filter by level or search text

Errors vs console.error

A console.error("foo") call captures as a console event (level error). An uncaught exception (throw new Error("foo")) captures separately as a js_error event. Both show up in the dashboard, but they live in different panels and count toward different dashboard metrics.

Related