mrkeyoor.com_
Wed 23 Sept 00:34 UTC
npmCLI & Toolingupdated 22 Sept 2026

fancy-log review

Fancy-log 2.0.0 is a Node console wrapper that prefixes each call with local time in [HH:mm:ss] form. The callable export plus info and dir write through a Console attached to stdout; warn and error use stderr. Arguments keep Node's usual Console formatting, and supported terminals color the timestamp using the util.inspect Date style. Version 2 made that timestamp styling the default and dropped Node releases below 10.13. That is the entire scope. There are no structured records, log filters, child contexts, transports, redaction rules, rotation, or persistence, which makes it suitable for Gulp tasks and small build scripts rather than production application logging.

Verdict

Fancy-log 2.0.0 installed in 0.8 seconds and occupied 1 MB across 2 packages on our box, but it supplied no types and could not produce a browser bundle. Use it for human-readable Gulp output; choose a structured logger as soon as records need filtering, fields, redaction, or storage.

We installed it

Lab card: what happened when we installed fancy-logScreenshot of fancy-log documentation
Install✓ · 0.8s2 packages on disk · 1 MB
ImportESM import works · require() works · CommonJS package
Browsern/acould not be bundled for the browser (Node-only code, most likely)
Typesno TypeScript types found
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)

Answers from our run

Does fancy-log install cleanly?

Yes. In a fresh container with an empty cache, npm install fancy-log finished in 0.8s, leaving 2 packages and 1 MB on disk. npm audit reported no known vulnerabilities.

Can fancy-log run in a browser?

Not directly: esbuild could not bundle it for the browser in our run, which normally means it depends on Node built-ins. Use it on the server, or find a browser-targeted alternative.

Does fancy-log work with both ESM and CommonJS?

Yes. Both import 'fancy-log' and require('fancy-log') worked in Node 22 in our run. The package is published as CommonJS.

Does fancy-log include TypeScript types?

No type declarations were found in our install, so TypeScript users need their own declarations.

fancy-log or pino: which should you use?

pino: Use it for production Node services that need structured JSON, levels, redaction, child loggers, and transport support. Fancy-log 2.0.0 installed in 0.8 seconds and occupied 1 MB across 2 packages on our box, but it supplied no types and could not produce a browser bundle.

When should you not use fancy-log?

Production services need JSON fields, log levels, child loggers, serializers, redaction, destinations, or rotation. Fancy-log implements none of them.

API stability5/5Version 2.0.0 has one callable CommonJS export with info, dir, warn, and error properties that follow Node Console conventions. The changelog names only two breaking changes for this major: Node versions below 10.13 were dropped, and timestamps adopted util.inspect's Date color. With no configuration objects, transports, serializers, or plugin contracts, there is little public surface to move, although the lack of an exports map leaves module loading dependent on Node's CommonJS interoperability.
Docs3/5The README shows the exact [HH:mm:ss] output, lists all five call forms, explains that they behave like matching Console methods, and documents timestamp color through util.inspect. The 2.0.0 changelog records both breaking changes. Missing details matter in tests and CI: the page does not map each method to stdout or stderr, explain that prefix and message are separate writes, state that time is local, describe color-flag precedence, or say that streams cannot be injected.
Maintenance2/5npm published 2.0.0 on 2022-01-07, while GitHub reports the last repository push on 2023-12-29. The repository is unarchived, has 123 stars, and currently shows 0 open issues and pull requests. That can be enough for a finished 20 KB utility, but no subsequent release has added current package metadata such as an exports map or TypeScript declarations, and the documentation still points its color explanation at the Node 10 manual.
Ecosystem4/5The npm downloads endpoint counted 3,860,387 downloads in the latest completed week, and ownership under gulpjs explains its presence in build dependency trees. It accepts normal Console arguments and needs only color-support, so adoption in CommonJS scripts is cheap. The surrounding ecosystem stops at display, though: there are no reporters, transports, formatters, level policies, or structured-record conventions comparable with Pino or other application loggers.

Use it if

  • A Gulpfile or Node build script should print the same timestamped console style as the surrounding Gulp tools.
  • Existing console-style placeholders and object arguments must keep working without logger configuration.
  • Warnings and errors need stderr while ordinary progress messages stay on stdout.
  • Build users expect literal --color and --no-color switches to control timestamp coloring.
Skip it if

Setup reality

We installed fancy-log 2.0.0 in a fresh unprivileged Node 22 Bookworm sandbox. npm finished in 0.8 seconds and left 2 packages using 1 MB on disk. Fancy-log itself is 20 KB unpacked, declares 1 direct dependency and 0 peers, and requires Node 10.13 or newer. npm audit found 0 known vulnerabilities. Its CommonJS entry worked with require() and ESM import, but there is no exports map and no TypeScript declaration file. Our esbuild browser build failed because the implementation depends on Node process streams and Console.

No credentials, native compilation, or config file are involved. CommonJS users call require('fancy-log'); Node ESM can import the CommonJS default in our measured environment. TypeScript projects need a local declaration, an external community type package if one remains compatible, or a typed logger instead. Version 2's visible change is timestamp coloring through util.inspect; it also raised the runtime floor from older Node releases to 10.13.

The module constructs one Console against process.stdout and process.stderr when loaded. You cannot inject a test stream or create an isolated logger instance. It writes the prefix separately from the message, so concurrent writers can interleave output between those writes. log, info, and dir go to stdout. warn and error put both prefix and content on stderr. None of those method names acts as a severity threshold.

Time comes from Date.toLocaleTimeString('en', { hour12: false }), which means local hours, minutes, and seconds. There is no UTC, date, millisecond, or prefix-off option. Color support is detected unless process.argv contains --color or --no-color; --no-color wins if both appear. Changing util.inspect.styles.date alters process-wide Date styling, not one fancy-log instance. Wrap this package at your own boundary if tests or machine ingestion need control.

Patterns

Print a timestamped progress line log-progress

const log = require('fancy-log');

log('Compiling templates');
// [16:27:02] Compiling templates

The prefix uses the machine's local time and contains no date, zone, or milliseconds.

Use Node Console placeholders format-console-values

const log = require('fancy-log');

log('Built %d files in %d ms', fileCount, elapsedMs);
log('Manifest: %j', manifest);

Node Console performs the formatting. A circular object cannot be represented by the %j JSON placeholder.

Write informational output write-info

log.info('Watching', sourceGlob);

info always emits to stdout. Fancy-log has no configured threshold that could suppress this call.

Send a warning to stderr write-warning

log.warn('Source map is missing for', filename);

warn writes its timestamp and message to stderr but does not deduplicate, count, or promote repeated warnings.

Report an error and fail the process write-error

try {
  await build();
} catch (error) {
  log.error('Build failed:', error);
  process.exitCode = 1;
}

log.error only writes to stderr. Set process.exitCode or throw if the surrounding task must fail.

Inspect a build object inspect-object

log.dir({
  task: 'styles',
  inputs: ['src/main.css'],
  cached: false,
});

log.dir delegates to Console.dir on stdout. Fancy-log provides no per-call option for inspect depth or color.

Disable timestamp color in CI disable-timestamp-color

node build.js --no-color

The package checks process.argv for the literal --no-color token. ANSI sequences emitted by your own message values are unaffected.

Force color for captured output force-timestamp-color

node build.js --color

When both color switches appear, --no-color takes precedence because the implementation checks it first.

Change the timestamp color change-date-style

const util = require('node:util');
const log = require('fancy-log');

util.inspect.styles.date = 'red';
log('Using red timestamps');

util.inspect.styles is global to the process, so other inspected Date values can change color too.

Report work from a Gulp task use-in-gulp-task

const { src, dest } = require('gulp');
const log = require('fancy-log');

function copyAssets() {
  log('Copying assets');
  return src('src/assets/**/*').pipe(dest('dist/assets'));
}

exports.assets = copyAssets;

Return the stream so Gulp observes completion. Fancy-log reports progress but has no role in task lifecycle.

Alternatives

PackageRegistryPick it when
pinonpmUse it for production Node services that need structured JSON, levels, redaction, child loggers, and transport support.
consolanpmUse it for developer-facing CLIs that need levels, reporters, polished output, and better TypeScript ergonomics.
debugnpmUse it in libraries that need namespace-based diagnostics enabled through an environment variable.

More cli & tooling guides

chalk · commander · typescript · esbuild · yargs · click · the whole shelf →

How this guide is made: grounded in the library's documentation, release notes, changelog, and issue history, on a fixed rubric — not a hands-on install of every release. The 50 most-downloaded entries are additionally install-verified in clean containers. Corrections: contact the desk.