{"_id":"pino-rotating-file-stream","_rev":"1-aa297bbe6dcc208b7d3bd56bd1b934f3","name":"pino-rotating-file-stream","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"pino-rotating-file-stream","version":"0.0.1","description":"A transport for pino that rotates logs","keywords":["pino","pino-transport","log-rotation","logging"],"homepage":"https://github.com/thelicato/pino-rotating-file-stream#readme","bugs":{"url":"https://github.com/thelicato/pino-rotating-file-stream/issues"},"packageManager":"pnpm@8.5.1","license":"MIT","author":{"name":"Angelo Delicato","email":"thelicato@duck.com"},"repository":{"type":"git","url":"git+https://github.com/thelicato/pino-rotating-file-stream.git"},"exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"./*.js":"./*.js","./*":{"require":"./*.js","import":"./*"}},"main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","typeScriptVersion":"3.7","devDependencies":{"@types/node":"^20.1.1","pino":"^8.14.1","pnpm":"^8.5.1","ts-node":"^10.9.1","tsc-alias":"^1.8.5","tsconfig-paths":"^4.2.0","typescript":"^5.0.4"},"dependencies":{"rotating-file-stream":"^3.1.0"},"scripts":{"build-mjs":"tsc -p tsconfig.mjs.json && tsc-alias -p tsconfig.mjs.json","build-cjs":"tsc -p tsconfig.cjs.json && tsc-alias -p tsconfig.cjs.json","build":"pnpm build-mjs && pnpm build-cjs"},"types":"./dist/cjs/index.d.ts","_id":"pino-rotating-file-stream@0.0.1","_integrity":"sha512-on3o1KEqFx9Gh+MUTzDjNru4RZbIcD8NAWjR+gihFe50QO7EoPoQ2ncgHhmZYP5T4qvquRgRwJm4U7PeYtLahA==","_resolved":"/tmp/2aee93a3cdd4c2f92ca01dc84b86b4bb/pino-rotating-file-stream-0.0.1.tgz","_from":"file:pino-rotating-file-stream-0.0.1.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-on3o1KEqFx9Gh+MUTzDjNru4RZbIcD8NAWjR+gihFe50QO7EoPoQ2ncgHhmZYP5T4qvquRgRwJm4U7PeYtLahA==","shasum":"9e86586d3d4d38dca06f8a0c846c75851e0d1289","tarball":"https://registry.npmjs.org/pino-rotating-file-stream/-/pino-rotating-file-stream-0.0.1.tgz","fileCount":13,"unpackedSize":9338,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcWRiFe9jvq5YUwcODTZK7CoOV2QY7CFtjneX9vopy9AiAyDWU+KNidDjLo4VRWwXBdCz1r5pwCCSeX5MSNu05iog=="}]},"_npmUser":{"name":"thelicato","email":"delicato.angelo@gmail.com"},"directories":{},"maintainers":[{"name":"thelicato","email":"delicato.angelo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pino-rotating-file-stream_0.0.1_1684315517773_0.9048888324288786"},"_hasShrinkwrap":false},"0.0.2":{"name":"pino-rotating-file-stream","version":"0.0.2","description":"A transport for pino that rotates logs","keywords":["pino","pino-transport","log-rotation","logging"],"homepage":"https://github.com/thelicato/pino-rotating-file-stream#readme","bugs":{"url":"https://github.com/thelicato/pino-rotating-file-stream/issues"},"packageManager":"pnpm@8.5.1","license":"MIT","author":{"name":"Angelo Delicato","email":"thelicato@duck.com"},"repository":{"type":"git","url":"git+https://github.com/thelicato/pino-rotating-file-stream.git"},"exports":{".":{"import":"./dist/mjs/index.js","require":"./dist/cjs/index.js"},"./*.js":"./*.js","./*":{"require":"./*.js","import":"./*"}},"main":"./dist/cjs/index.js","module":"./dist/mjs/index.js","typeScriptVersion":"3.7","devDependencies":{"@types/node":"^20.1.1","pino":"^8.14.1","pnpm":"^8.5.1","ts-node":"^10.9.1","tsc-alias":"^1.8.5","tsconfig-paths":"^4.2.0","typescript":"^5.0.4"},"dependencies":{"rotating-file-stream":"^3.1.0"},"scripts":{"build-mjs":"tsc -p tsconfig.mjs.json && tsc-alias -p tsconfig.mjs.json","build-cjs":"tsc -p tsconfig.cjs.json && tsc-alias -p tsconfig.cjs.json","build":"pnpm build-mjs && pnpm build-cjs"},"types":"./dist/cjs/index.d.ts","_id":"pino-rotating-file-stream@0.0.2","_integrity":"sha512-knF+ReDBMQMB7gzBfuFpUmCrXpRen6YYh5Q9Ymmj//dDHeH4QEMwAV7VoGEEM+30s7VHqfbabazs9wxkMO2BIQ==","_resolved":"/tmp/48dd19f0a1dd9b98c8a96bab5eeadecb/pino-rotating-file-stream-0.0.2.tgz","_from":"file:pino-rotating-file-stream-0.0.2.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-knF+ReDBMQMB7gzBfuFpUmCrXpRen6YYh5Q9Ymmj//dDHeH4QEMwAV7VoGEEM+30s7VHqfbabazs9wxkMO2BIQ==","shasum":"930a3fc8ad0056f398d3eaf22827f273990beb86","tarball":"https://registry.npmjs.org/pino-rotating-file-stream/-/pino-rotating-file-stream-0.0.2.tgz","fileCount":13,"unpackedSize":9576,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDc3Kv8b3K3vO21vlVynz+T75xb0CWMEIeZW5IpXGuvFAiEAr99K7RxGnhsh2+z9xRtgHykCC2+3xnrLkYwAWC8k/KE="}]},"_npmUser":{"name":"thelicato","email":"delicato.angelo@gmail.com"},"directories":{},"maintainers":[{"name":"thelicato","email":"delicato.angelo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pino-rotating-file-stream_0.0.2_1684318601184_0.0863896670165698"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-17T09:25:17.773Z","0.0.1":"2023-05-17T09:25:17.908Z","modified":"2023-05-17T10:16:41.520Z","0.0.2":"2023-05-17T10:16:41.398Z"},"maintainers":[{"name":"thelicato","email":"delicato.angelo@gmail.com"}],"description":"A transport for pino that rotates logs","homepage":"https://github.com/thelicato/pino-rotating-file-stream#readme","keywords":["pino","pino-transport","log-rotation","logging"],"repository":{"type":"git","url":"git+https://github.com/thelicato/pino-rotating-file-stream.git"},"author":{"name":"Angelo Delicato","email":"thelicato@duck.com"},"bugs":{"url":"https://github.com/thelicato/pino-rotating-file-stream/issues"},"license":"MIT","readme":"# pino-rotating-file-stream\n\n[![NPM Package Version](https://img.shields.io/npm/v/pino-rotating-file-stream)](https://www.npmjs.com/package/pino-rotating-file-stream)\n\n## Description\n\nThis module provides a **transport** for *pino* to automatically rotates logs. Under the hood, it uses [rotating-file-stream](https://www.npmjs.com/package/rotating-file-stream) even though some fields have been added to the default *Options*.\n\n## CLI\nThe current version of this packages has only support for the module usage as described in the [Programmatic Integration](#programmatic-integration) section. This feature will be added in next versions of the package.\nFor now you can rely on [@vrbo/pino-rotating-file](https://www.npmjs.com/package/@vrbo/pino-rotating-file) for CLI integration.\n## Programmatic Integration\nInstall ``pino-rotating-file-stream`` alongside ``pino`` and set the transport to ``pino-rotating-file-stream``:\n\n```js\nconst pino = require('pino')\nconst logger = pino({\n  transport: {\n    target: 'pino-rotating-file-stream',\n    options: {\n      filename: 'app.log', // Required\n      path: './logs', // Required\n    },\n  },\n})\n\nlogger.info('hi')\n```\n\nSee also the example in the ``examples`` folder.\n\n### Options\nThe options are essentially the same provided by ``rotating-file-stream`` except form two new entries. The following list shows all the options with the default values:\n```js\n{\n  filename: string; // Specifies the name of the file. Required.\n  path: string // Specifies the base path for files. Required.\n  size: string // Specifies the file size to rotate the file. Default: '100M'.\n  maxSize: string // Specifies the maximum size of rotated files to keep. Default: '1G'.\n  interval: string // Specifies the time interval to rotate the file. Default: '7d'.\n  compress: boolean | string | Function // Specifies compression method of rotated files. Default: 'gzip'.\n  encoding: string // Specifies the default encoding. Default: 'utf8'.\n  history: string // Specifies the history filename. Default: null.\n  immutable: boolean // Never mutate file names. Default: null.\n  initialRotation: boolean // Initial rotation based on not-rotated file timestamp. Default: null.\n  intervalBoundary: boolean // Makes rotated file name with lower boundary of rotation period. Default: null.\n  maxFiles: number // Specifies the maximum number of rotated files to keep. Default: null.\n  mode: number // Proxied to fs.createWriteStream. Default: 0o666.\n  omitExtension: // boolean Omits the .gz extension from compressed rotated files. Default: null.\n  rotate: number // Enables the classical UNIX logrotate behaviour. Default: null.\n  teeToStdout: boolean // Writes file content to stdout as well. Default: null.\n}\n```\n\n## License\n\n[MIT](./LICENSE) License © 2023 [Angelo Delicato](https://github.com/thelicato)","readmeFilename":"README.md"}