Registry / devops / palin
library2.3.0jsnpmunverified

Palin is a Bristol log formatter for development, providing colorful, detailed console output with timestamps, file paths, and support for multiple arguments including Errors and objects. Version 2.3.0 is current and stable. It requires Bristol ~0.4.0 as a peer dependency. Unlike generic formatters, Palin offers configurable timestamp, indent, object depth, and source display options.

npm install palin
INSTALL
IMPORT
SIG · PALIN
P
palin
devopsjavascriptv2.3.0
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.

palin
const palin = require('palin');
import palin from 'palin';
palin is a CommonJS module; ES modules are not supported.
palin
log.addTarget('console').withFormatter(palin);
log.addTarget('console').withFormatter('palin');
Pass the palin function directly, not a string.
palin
const palin = require('palin');
const { palin } = require('palin');
palin is exported as a single function, not a named export.
bristol
const bristol = require('bristol');
const bristol = require('bristol').Bristol;
bristol is a function, not a class. Use require('bristol') directly.

Shows how to require Palin with Bristol, configure options, and log messages including an Error.

const log = require('bristol'); const palin = require('palin'); log.addTarget('console').withFormatter(palin, { rootFolderName: 'MyApp', timestamp: function(date) { return date.toISOString(); }, indent: ' → ', objectDepth: 3, source: true }); const err = new Error('sample error'); log.info('App started', { port: 3000 }); log.error('Something failed', err);
Debug
Known issues
gotchaPalin will throw if peer dependency Bristol is not installed.
fix
Run 'npm install bristol' alongside palin.
affects: >=0.0.0
gotchaThe 'souce' option in README is a typo; it should be 'source'. Using 'souce' will be silently ignored.
fix
Use the option name 'source' (not 'souce').
affects: >=2.0.0
deprecatedBristol is no longer actively maintained (last release 2016). Palin depends on it.
fix
Consider migrating to a maintained logging library like Winston or pino.
affects: >=0.0.0
gotchaPalin does not work with Bristol versions >0.4.x. The API changed after Bristol 0.4.
fix
Pin Bristol to ~0.4.0 in package.json.
affects: >=2.0.0
Errors
Common errors & fixes
Cannot find module 'bristol'
Missing peer dependency 'bristol'.
fix
Run 'npm install bristol' in your project.
log.addTarget is not a function
Using an incompatible version of Bristol (>=1.0.0) or not requiring Bristol correctly.
fix
Ensure you have bristol@~0.4.0 installed and required as 'const bristol = require('bristol');'
palin is not a function
Importing palin incorrectly (e.g., destructuring it).
fix
Use 'const palin = require('palin');' (default export is a function).
TypeError: palin is not a function
Using ES module syntax like 'import palin from 'palin';' which returns undefined in Node.
fix
Switch to CommonJS: 'const palin = require('palin');'
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
bristolrequiredpeer dependency - Palin is a logger formatter for Bristol; must be installed separately
Agent activity
6 hits · last 30 days
node
6
Resources
packagepalin
palin — npm install palin · libregistry