{"_id":"winston-loggerex","_rev":"3-e8f4c416dbc694e5c9e19e35d23ea2bd","name":"winston-loggerex","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.1":{"name":"winston-loggerex","version":"1.0.1","keywords":["logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"author":{"name":"John25","email":"john251000@gmail.com"},"license":"MIT","_id":"winston-loggerex@1.0.1","maintainers":[{"name":"john251000","email":"jdelury29@gmail.com"}],"homepage":"https://github.com/john25s/winston-loggerex#readme","bugs":{"url":"https://github.com/john25s/winston-loggerex/issues"},"dist":{"shasum":"13cd6f454189fd6e71dc32d3e6c7aad0b04215c9","tarball":"https://registry.npmjs.org/winston-loggerex/-/winston-loggerex-1.0.1.tgz","fileCount":40,"integrity":"sha512-nuxkFlZz8TrDfAu/cXcu6f/AdeHyz/5Yt5f/Y1+BclSLtWEgwW/ZLMxWU6UzSGmbG43TdN25E/6sPkOWlJLrQg==","signatures":[{"sig":"MEYCIQCXvQzzkJd+bTgohruwNKVTpkE5vp0Wb5DYAuE7qns78AIhAPjFeWPFKnRHhL0GmyL3R3kLbzFAdwNyHMraGhSoueLE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196569},"main":"./lib/winston-loggerex.js","types":"./index.d.ts","browser":"./dist/winston-loggerex","engines":{"node":">= 12.0.0"},"scripts":{"lint":"eslint winston-loggerex/*.js lib/winston-loggerex/*.js lib/winston-loggerex/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","test":"rimraf test/fixtures/logs/* && mocha","build":"rimraf dist && babel lib -d dist","test:unit":"mocha test/unit","test:coverage":"nyc npm run test:unit","prepublishOnly":"npm run build","test:integration":"mocha test/integration"},"_npmUser":{"name":"john251000","email":"jdelury29@gmail.com"},"repository":{"url":"git+https://github.com/john25s/winston-loggerex.git","type":"git"},"_npmVersion":"10.9.2","description":"An Extended Node.js logger with anything easy.","directories":{},"_nodeVersion":"22.17.0","dependencies":{"async":"^3.2.3","logform":"^2.7.0","one-time":"^1.0.0","is-stream":"^2.0.0","hardwareid":"^1.0.2","stack-trace":"0.0.x","triple-beam":"^1.3.0","@colors/colors":"^1.6.0","readable-stream":"^3.4.0","@dabh/diagnostics":"^2.0.2","winston-transport":"^4.9.0","safe-stable-stringify":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^17.1.0","hock":"^1.4.1","mocha":"^10.3.0","assume":"^2.2.0","eslint":"^8.57.0","rimraf":"5.0.1","split2":"^4.1.0","through2":"^4.0.2","std-mocks":"^2.0.0","@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@types/node":"^20.11.24","winston-compat":"^0.1.5","@babel/preset-env":"^7.24.0","cross-spawn-async":"^2.2.5","abstract-winston-transport":"^0.5.1","@dabh/eslint-config-populist":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/winston-loggerex_1.0.1_1760286496801_0.4141630872218103","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"winston-loggerex","version":"1.0.3","keywords":["logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"author":{"name":"John25","email":"john251000@gmail.com"},"license":"MIT","_id":"winston-loggerex@1.0.3","maintainers":[{"name":"john251000","email":"jdelury29@gmail.com"}],"homepage":"https://github.com/john25s/winston-loggerex#readme","bugs":{"url":"https://github.com/john25s/winston-loggerex/issues"},"dist":{"shasum":"f0bb11240e8d2eb033fec8e650c10a35e26e3315","tarball":"https://registry.npmjs.org/winston-loggerex/-/winston-loggerex-1.0.3.tgz","fileCount":40,"integrity":"sha512-jKt2Mq0F732ZdBcJAKb8n4oNBayMKoazsebXdL6DZYAUEKoyb/Z5EWC6G5rZFpvsctrjmc3IhXl5pV06bWWpzQ==","signatures":[{"sig":"MEQCIDUQ9eTLsueAkp5Dv8bqAC3t9P9k93UcIMj0VAhs8yEcAiBLk0y/ofDToJEk0jcrvdy5VXtLTjiEwESpohBrIWiMXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196569},"main":"./lib/winston-loggerex.js","types":"./index.d.ts","browser":"./dist/winston-loggerex","engines":{"node":">= 12.0.0"},"scripts":{"lint":"eslint winston-loggerex/*.js lib/winston-loggerex/*.js lib/winston-loggerex/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","test":"rimraf test/fixtures/logs/* && mocha","build":"rimraf dist && babel lib -d dist","test:unit":"mocha test/unit","test:coverage":"nyc npm run test:unit","prepublishOnly":"npm run build","test:integration":"mocha test/integration"},"_npmUser":{"name":"john251000","email":"jdelury29@gmail.com"},"repository":{"url":"git+https://github.com/john25s/winston-loggerex.git","type":"git"},"_npmVersion":"11.2.0","description":"An Extended Node.js logger with anything easy.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"async":"^3.2.3","logform":"^2.7.0","one-time":"^1.0.0","is-stream":"^2.0.0","hardwareid":"^1.0.2","stack-trace":"0.0.x","triple-beam":"^1.3.0","@colors/colors":"^1.6.0","readable-stream":"^3.4.0","@dabh/diagnostics":"^2.0.2","winston-transport":"^4.9.0","safe-stable-stringify":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^17.1.0","hock":"^1.4.1","mocha":"^10.3.0","assume":"^2.2.0","eslint":"^8.57.0","rimraf":"5.0.1","split2":"^4.1.0","through2":"^4.0.2","std-mocks":"^2.0.0","@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@types/node":"^20.11.24","winston-compat":"^0.1.5","@babel/preset-env":"^7.24.0","cross-spawn-async":"^2.2.5","abstract-winston-transport":"^0.5.1","@dabh/eslint-config-populist":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/winston-loggerex_1.0.3_1776703548048_0.6127380356484329","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"winston-loggerex","description":"An Extended Node.js logger with anything easy.","version":"1.0.5","author":{"name":"John25","email":"john251000@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/john25s/winston-loggerex.git"},"keywords":["logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0","async":"^3.2.3","is-stream":"^2.0.0","logform":"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","hardwareid":"^1.0.2","winston-transport":"^4.9.0"},"devDependencies":{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","cross-spawn-async":"^2.2.5","eslint":"^8.57.0","hock":"^1.4.1","mocha":"^10.3.0","nyc":"^17.1.0","rimraf":"5.0.1","split2":"^4.1.0","std-mocks":"^2.0.0","through2":"^4.0.2","winston-compat":"^0.1.5"},"main":"./lib/winston-loggerex.js","browser":"./dist/winston-loggerex","types":"./index.d.ts","scripts":{"lint":"eslint winston-loggerex/*.js lib/winston-loggerex/*.js lib/winston-loggerex/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist","test":"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration","build":"rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 12.0.0"},"license":"MIT","_id":"winston-loggerex@1.0.5","bugs":{"url":"https://github.com/john25s/winston-loggerex/issues"},"homepage":"https://github.com/john25s/winston-loggerex#readme","_nodeVersion":"22.14.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-QxNxewQHaXNHJJoi0jlLXFiwrqblf3O8LrX53FE/M+Ks957PBXVJnQBD88By0ciPzLSaTFacW5OlxPCXqRJJnw==","shasum":"364aa0182b5547091737542b77a68497237a6851","tarball":"https://registry.npmjs.org/winston-loggerex/-/winston-loggerex-1.0.5.tgz","fileCount":40,"unpackedSize":196772,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFoyUJISGjGMDO6ppRWeIUVf8ztDtZyBIWhiQxfJNcX0AiBUuXF8VJ04iRhrRUudzs6VXq9O4Nu6DnS7q3t9qZn+FA=="}]},"_npmUser":{"name":"john251000","email":"jdelury29@gmail.com"},"directories":{},"maintainers":[{"name":"john251000","email":"jdelury29@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/winston-loggerex_1.0.5_1776827578591_0.5118286284146059"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-12T16:28:16.666Z","modified":"2026-04-22T03:12:58.823Z","1.0.1":"2025-10-12T16:28:16.992Z","1.0.3":"2026-04-20T16:45:48.183Z","1.0.5":"2026-04-22T03:12:58.716Z"},"bugs":{"url":"https://github.com/john25s/winston-loggerex/issues"},"author":{"name":"John25","email":"john251000@gmail.com"},"license":"MIT","homepage":"https://github.com/john25s/winston-loggerex#readme","keywords":["logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"repository":{"type":"git","url":"git+https://github.com/john25s/winston-loggerex.git"},"description":"An Extended Node.js logger with anything easy.","maintainers":[{"name":"john251000","email":"jdelury29@gmail.com"}],"readme":"# winston-loggerex\n\nAn Extended Node.js logger with anything easy.\n\n## Motivation\n\n`winston-loggerex` is designed to be a simple and universal logging library with\nsupport for multiple transports. A transport is essentially a storage device\nfor your logs. Each `winston-loggerex` logger can have multiple transports (see:\n[Transports]) configured at different levels (see: [Logging levels]). For\nexample, one may want error logs to be stored in a persistent remote location\n(like a database), but all logs output to the console or a local file.\n\n`winston-loggerex` aims to decouple parts of the logging process to make it more\nflexible and extensible. Attention is given to supporting flexibility in log\nformatting (see: [Formats]) & levels (see: [Using custom logging levels]), and\nensuring those APIs decoupled from the implementation of transport logging\n(i.e. how the logs are stored / indexed, see: [Adding Custom Transports]) to\nthe API that they exposed to the programmer.\n\n## Quick Start\n\nTL;DR? Check out the [quick start example][quick-example] in `./examples/`.\nThere are a number of other examples in [`./examples/*.js`][examples].\nDon't see an example you think should be there? Submit a pull request\nto add it!\n\n## Usage\n\nThe recommended way to use `winston-loggerex` is to create your own logger. The\nsimplest way to do this is using `loggerex.createLogger`:\n\n``` js\nconst loggerex = require('winston-loggerex');\n\nconst logger = loggerex.createLogger({\n  level: 'info',\n  format: loggerex.format.json(),\n  defaultMeta: { service: 'user-service' },\n  transports: [\n    //\n    // - Write all logs with importance level of `error` or higher to `error.log`\n    //   (i.e., error, fatal, but not other levels)\n    //\n    new loggerex.transports.File({ filename: 'error.log', level: 'error' }),\n    //\n    // - Write all logs with importance level of `info` or higher to `combined.log`\n    //   (i.e., fatal, error, warn, and info, but not trace)\n    //\n    new loggerex.transports.File({ filename: 'combined.log' }),\n  ],\n});\n\n//\n// If we're not in production then log to the `console` with the format:\n// `${info.level}: ${info.message} JSON.stringify({ ...rest }) `\n//\nif (process.env.NODE_ENV !== 'production') {\n  logger.add(new loggerex.transports.Console({\n    format: loggerex.format.simple(),\n  }));\n}\n```\n\nYou may also log directly via the default logger exposed by\n`require('winston-loggerex')`, but this merely intended to be a convenient shared\nlogger to use throughout your application if you so choose.\nNote that the default logger doesn't have any transports by default.\nYou need add transports by yourself, and leaving the default logger without any\ntransports may produce a high memory usage issue.\n\n\n[Transports]: #transports\n[Logging levels]: #logging-levels\n[Formats]: #formats\n[Using custom logging levels]: #using-custom-logging-levels\n[Adding Custom Transports]: #adding-custom-transports\n[core transports]: docs/transports.md#winston-loggerex-core\n[additional transports]: docs/transports.md#additional-transports\n\n[RFC5424]: https://tools.ietf.org/html/rfc5424\n[util.format]: https://nodejs.org/dist/latest/docs/api/util.html#util_util_format_format_args\n[mocha]: https://mochajs.org\n[nyc]: https://github.com/istanbuljs/nyc\n[assume]: https://github.com/bigpipe/assume\n\n\n","readmeFilename":"README.md"}