UsefulKey

Console

Logs analytics events to stdout. Useful for local development.

Overview

  • Analytics adapter that logs events to the console. Good for development and tests.

Usage

import { ConsoleAnalytics, usefulkey } from "betterkey";

const analytics = new ConsoleAnalytics();
const uk = usefulkey({ adapters: { analytics } });

Behavior

  • Prints events as [usefulkey:analytics] <event> with a JSON payload.
  • Non-blocking; errors are ignored by plugins.

On this page