{"id":41698,"library":"palin","title":"Palin","description":"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.","status":"active","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/MarkHerhold/palin","tags":["javascript","color","logger","formatter","bristol"],"install":[{"cmd":"npm install palin","lang":"bash","label":"npm"},{"cmd":"yarn add palin","lang":"bash","label":"yarn"},{"cmd":"pnpm add palin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - Palin is a logger formatter for Bristol; must be installed separately","package":"bristol","optional":false}],"imports":[{"note":"palin is a CommonJS module; ES modules are not supported.","wrong":"import palin from 'palin';","symbol":"palin","correct":"const palin = require('palin');"},{"note":"Pass the palin function directly, not a string.","wrong":"log.addTarget('console').withFormatter('palin');","symbol":"palin","correct":"log.addTarget('console').withFormatter(palin);"},{"note":"palin is exported as a single function, not a named export.","wrong":"const { palin } = require('palin');","symbol":"palin","correct":"const palin = require('palin');"},{"note":"bristol is a function, not a class. Use require('bristol') directly.","wrong":"const bristol = require('bristol').Bristol;","symbol":"bristol","correct":"const bristol = require('bristol');"}],"quickstart":{"code":"const log = require('bristol');\nconst palin = require('palin');\n\nlog.addTarget('console').withFormatter(palin, {\n  rootFolderName: 'MyApp',\n  timestamp: function(date) { return date.toISOString(); },\n  indent: '  →  ',\n  objectDepth: 3,\n  source: true\n});\n\nconst err = new Error('sample error');\nlog.info('App started', { port: 3000 });\nlog.error('Something failed', err);","lang":"javascript","description":"Shows how to require Palin with Bristol, configure options, and log messages including an Error."},"warnings":[{"fix":"Run 'npm install bristol' alongside palin.","message":"Palin will throw if peer dependency Bristol is not installed.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use the option name 'source' (not 'souce').","message":"The 'souce' option in README is a typo; it should be 'source'. Using 'souce' will be silently ignored.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Consider migrating to a maintained logging library like Winston or pino.","message":"Bristol is no longer actively maintained (last release 2016). Palin depends on it.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Pin Bristol to ~0.4.0 in package.json.","message":"Palin does not work with Bristol versions >0.4.x. The API changed after Bristol 0.4.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'0.4.0':37 '2.3.0':29 'argument':23 'bristol':5,36,60 'color':11,57 'configur':47 'consol':13 'current':31 'depend':41 'depth':51 'detail':12 'develop':9 'display':54 'error':25 'file':17 'formatt':7,44,59 'generic':43 'includ':24 'indent':49 'javascript':56 'log':6 'logger':58 'multipl':22 'object':27,50 'offer':46 'option':55 'output':14 'palin':1,2,45 'path':18 'peer':40 'provid':10 'requir':35 'sourc':53 'stabl':33 'support':20 'timestamp':16,48 'unlik':42 'version':28","created_at":"2026-06-04T18:53:40.658918+00:00","updated_at":"2026-06-04T18:53:40.658918+00:00","problems":[{"fix":"Run 'npm install bristol' in your project.","cause":"Missing peer dependency 'bristol'.","error":"Cannot find module 'bristol'"},{"fix":"Ensure you have bristol@~0.4.0 installed and required as 'const bristol = require('bristol');'","cause":"Using an incompatible version of Bristol (>=1.0.0) or not requiring Bristol correctly.","error":"log.addTarget is not a function"},{"fix":"Use 'const palin = require('palin');' (default export is a function).","cause":"Importing palin incorrectly (e.g., destructuring it).","error":"palin is not a function"},{"fix":"Switch to CommonJS: 'const palin = require('palin');'","cause":"Using ES module syntax like 'import palin from 'palin';' which returns undefined in Node.","error":"TypeError: palin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/MarkHerhold/palin#readme","github":"https://github.com/MarkHerhold/palin","docs":null,"changelog":null,"pypi":null,"npm":"palin","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}