open-index/open-npm huggingface dataset:
npm package: @instant-legacy/loggable
Description: Logging for the rest of us.
Latest version: 0.1.7

# loggable

Logging for the rest of us.

[source](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7) | [examples](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples) | [npm](https://npmjs.com/package/@instant-legacy/loggable/v/0.1.7) | [jsr](https://jsr.io/@instant-legacy/loggable@0.1.7)

## about

A web & console typescript logger built for being reasonably small, low-overhead (early profiling seem to indicate a <15% overhead over plain `console.log('Test',i)` when using `Logger.root.child('parent').child('child').log('Test',i)`), pretty, and maintainable.

It can be vendored by copying 2 (for Svelte, a third helper can be nice) files into your repository.

Esbuild with `--minify --bundle --target=firefox144 --platform=browser --format=esm` on `src/lib.ts`, as of writing, gives back 3.7k of JS. [bundlephobia](https://bundlephobia.com/package/@instant-legacy/loggable) claims 1.9kB gzip'ed.

## examples & how it looks

[`examples/single-line.ts`](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/single-line.ts):\
[![a single-line terminal log](https://codeberg.org/instant-legacy/loggable/raw/tag/v0.1.7/examples/images/multiline:terminal.png)](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/images/multiline:terminal.png)
[![a single-line browser log](https://codeberg.org/instant-legacy/loggable/raw/tag/v0.1.7/examples/images/multiline:firefox.png)](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/images/multiline:firefox.png)

[`examples/multiline.ts`](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/multiline.ts):\
[![a multiline terminal log](https://codeberg.org/instant-legacy/loggable/raw/tag/v0.1.7/examples/images/multiline:terminal.png)](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/images/multiline:terminal.png)
[![a multiline browser log](https://codeberg.org/instant-legacy/loggable/raw/tag/v0.1.7/examples/images/multiline:firefox.png)](https://codeberg.org/instant-legacy/loggable/src/tag/v0.1.7/examples/images/multiline:firefox.png)