Registry / devops / bole-console

bole-console

JSON →
library0.1.10jsnpmunverified

A console formatter plugin for the bole logger, version 0.1.10. It formats and colorizes JSON log output and writes to stdout. Options include timestamp, hostname, pid, indentation, colors, and request details. No recent updates; likely in maintenance mode. Lightweight alternative to more complex logging formatters.

npm install bole-console
INSTALL
IMPORT
SIG · BOLE-CONSOLE
B
bole-console
devopsjavascriptv0.1.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export (factory function)
import boleConsole from 'bole-console'
const boleConsole = require('bole-console');
Package is CJS-only; ESM import may need bundler support. Works with dynamic import.
Factory function call
const stream = boleConsole({ timestamp: true })
const stream = new boleConsole()
The export is a factory function, not a constructor. Must be called with options.
Integration with bole
bole.output([{ level: 'info', stream: boleConsole() }])
bole.output([{ level: 'info', stream: new boleConsole() }])
Expects a stream instance, not a class.

Shows how to create a console stream with timestamp and request details, then output via bole.

const bole = require('bole'); const boleConsole = require('bole-console'); const stream = boleConsole({ timestamp: true, requestDetails: true }); bole.output([ { level: 'info', stream: stream } ]); const log = bole('my-module'); log.info('Hello, world!');
Debug
Known issues
gotchaThe export is a factory function, not a constructor. Calling new on it will throw.
fix
Call boleConsole(options) without new.
affects: >=0.0.0
gotchaThe module must be used with bole; standalone use is unsupported.
fix
Ensure bole is installed and use bole.output() to register this stream.
affects: >=0.0.0
deprecatedPackage has not been updated since 2014; uses outdated dependencies.
fix
Consider migrating to modern logging libraries like pino or winston.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: boleConsole is not a constructor
Trying to use new with the factory function.
fix
Remove the `new` keyword: `const stream = boleConsole(options);`
Cannot find module 'bole'
Missing peer dependency bole.
fix
Install bole: `npm install bole`
TypeError: boleConsole is not a function
Using default import from ESM incorrectly or wrong require path.
fix
Use `const boleConsole = require('bole-console');` in CommonJS.
Upgrade
Version history
0.1.10latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
Resources
bole-console — npm install bole-console · libregistry