npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@genesislcap/foundation-logger

v15.72.0

Published

Genesis Foundation Logger

Readme

@genesislcap/foundation-logger

Documentation for this package is published on the Genesis docs site:

Docs: Utility methods

Log output

Console messages do not include an in-message timestamp by default (Chrome's DevTools clock is separate). Opt in with a live global switch so every createLogger instance, including those already created by Foundation packages, prefixes messages with local time including milliseconds (for example 11:52:03.412):

import { setLogTimestamps } from '@genesislcap/foundation-logger';

setLogTimestamps(true);

The flag is stored on globalThis via Symbol.for, so one call also reaches Module Federation remotes that bundled their own copy of this package (rather than sharing the host's module).

Enable or disable the prefix on one logger only:

import { createLogger } from '@genesislcap/foundation-logger';

createLogger('demo', { timestamps: true });
createLogger('quiet', { timestamps: false });
createLogger('legacy', { formatOptions: { date: true } });

Options passed to createLogger are always merged with defaultLoggerOptions. Callers that omit level therefore get debug (this package's default), not Consola's bare info default.

A default reporter is only installed in the browser. Outside the browser Consola has no default reporter, so loggers stay silent unless you pass reporters explicitly:

import { createLogger, TimestampBrowserReporter } from '@genesislcap/foundation-logger';

createLogger('node-side', { reporters: [new TimestampBrowserReporter()] });

Global log reporters

Genesis packages (foundation-comms, foundation-state-machine, etc.) report messages through their own createLogger() instances created at import time. Register a global reporter to observe logs from all foundation loggers across the application, including loggers instantiated before registration and loggers created by Module Federation remotes:

import { addGlobalLogReporter } from '@genesislcap/foundation-logger';

const unsubscribe = addGlobalLogReporter({
  log: ({ type, tag, args }) => {
    if (type !== 'error') return;
    const error = args.find((a) => a instanceof Error);
    error
      ? Sentry.captureException(error, { tags: { logger: tag } })
      : Sentry.captureMessage(`${tag}: ${String(args[0])}`, { level: 'error' });
  },
});

// Remove the reporter when no longer needed:
unsubscribe();

Logged arguments can hold credentials or personal and business data, so avoid forwarding them to a third-party service. setupErrorMonitoring from @genesislcap/foundation-utils wires this up and sends only log messages and exceptions.

The reporter registry is stored on globalThis via Symbol.for, so one registration covers every runtime copy of this package that uses the same registry version. A copy built against an older registry shape keeps its own registry rather than breaking this one. Child loggers (withTag, withScope, withDefaults, create) are covered too. A reporter that throws is reported on the console instead of breaking the log call, and a logger created with the reporter in its own reporters keeps it after unsubscribing.

Installation

Add the package to your package.json dependencies. After changing dependencies, run npm run bootstrap (or your project's equivalent). See package.json basics for more information.

{
  "dependencies": {
    "@genesislcap/foundation-logger": "latest"
  }
}

License

Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact Genesis Global for more details.

Licensed components

Genesis low-code platform