{"_id":"@arivlabs/logger","_rev":"8-f965879aa3e96453e5123c52319675b4","name":"@arivlabs/logger","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@arivlabs/logger","version":"1.0.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.0.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"79db185a87c8db2ec8bbcb1d5e20c9d9cd4b7369","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.0.0.tgz","fileCount":16,"integrity":"sha512-owMCe+PWUqhGkh0UetPUAolrkjNtlOWv84cLcZUAAFhPPffh8Ub6clE1WfyytB3hk9HJ4XbyMhsRC/ohSZCh0Q==","signatures":[{"sig":"MEYCIQDMCqBZS4r91yxqM4Hj4HdNCkQzJC2vkIOHM/3UpqmfIQIhAK7rv0KqhHZhA6ID2kiG8BQAb3BKb4GrbbON8V//B7Kj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":30311},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"f416152cf06aacca2d3ed4f02cccea1cff5e8e68","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.0_1766465293475_0.21165512985378943","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@arivlabs/logger","version":"1.1.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.1.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"62ecacbeb96a81ed55d4b378d9a1a0cc0e34b172","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.1.0.tgz","fileCount":12,"integrity":"sha512-QuJbCJ0oczWVWWXdcYpeujRZacJ5zk30dS67Ruwn6nvMGGaIYoqGEKsEKVoWnjwYwC4gXu8Rf0BV4Pxs1jj6Yw==","signatures":[{"sig":"MEUCICRz4bPa4Kwh+8tfgqJ/F814dVDDK2+IE5xMfx1t/1oSAiEAma1V28P6mp2WOFInnrFHBMErGXmG8lBEdCIiy37pm0I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40278},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"430e8eebeca3d779b03815986a02d0a5cb45171e","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.1.0_1766466970138_0.3747674070279894","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@arivlabs/logger","version":"1.2.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.2.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"1ed2035badf0be2fea824f0816a5fc7c7b2c71c6","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.2.0.tgz","fileCount":12,"integrity":"sha512-WfiFnMI9Yjjqa+3QuPz9lLFhDoeiCHZZjwNvSj6qNSHQ44aYhIFMnFgg6LYs6LWOYpEAU7WP0cBlnGmJ9tEz1A==","signatures":[{"sig":"MEUCIAWvs0Y8tt7aam1Lz1z0fbRMLl4sc9sHa59MaBJJmFZDAiEAhABW3ynH5Z2MCsaLsz5r1PWd7zgMkSz3XPAfjPf2fLU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":42185},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"72861490af805f6db217fd6de0eccb043d71c0c6","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.2.0_1766467581031_0.846119932115873","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@arivlabs/logger","version":"1.3.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.3.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"3b19c93326793f1abddb4332a31cd2980e14810d","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.3.0.tgz","fileCount":12,"integrity":"sha512-9oisOMimcnoAGyeVQp4snhlLOyMjkJX1n5PI0KNIAbG6YUkoWCuZ1Hfj0Xg9CgeAmdYBSnUTzERKKQWJA4AfHg==","signatures":[{"sig":"MEYCIQDgfJ/Lagq0HyPurB4wk2KWMjs++7WoPwxM45qTC1hJbAIhAM7ReJRXwjbFjGF+E6Qc5SuohD+X5Ohl7ByC8e4NmCrR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":45950},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"d291ce08e87678d6846845d82f68cd278ab5dc75","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.3.0_1766467997157_0.4642227319149981","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@arivlabs/logger","version":"1.4.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.4.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"7061e98ca7cb4e00c895df729da47f59656c25c6","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.4.0.tgz","fileCount":12,"integrity":"sha512-XrafkCW8Cfv6nwRGAqw/ZYNkuAvTtWc9cX3LhGKTBkec12kCoVZScJ0/Im1EVrkO7+FWs1/GN66rEeMxs9Zbww==","signatures":[{"sig":"MEUCIEjmyYeZfHh4QaUadISoVVKaJ1uV2pb8vodDfnKnMJdOAiEA91SCrDCfgLfR9PTrVKpC6ElTIb1ED8njSpM6P0wrV8A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56410},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"826401278e36b3981077c9d0319d1a415f3dacc4","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.4.0_1766473229410_0.9815346698723102","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@arivlabs/logger","version":"1.4.1","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.4.1","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"2e626d4fe9877dd08af92496a4559662cca40696","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.4.1.tgz","fileCount":12,"integrity":"sha512-0bo1A9LPgD7GYP0JmysnpJwhupOtflFhV/vbnNnKMpBLLNv9oH7OhRdfRhciPbHVGzHteOixxDgBnnqZm3yhnw==","signatures":[{"sig":"MEUCIQC6SlNLKrxoJsVrqTEIYY7KMk+upBYqMesZhC8aHcYj+AIgMwrGlz2U1lYemQZKbYN+fIzKPpS5GTAi4toET9GpjfE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56561},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"670878eed7ae002ef3f8b82ebde6586923985d64","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"10.9.4","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.4.1_1767014195334_0.2516739396346872","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@arivlabs/logger","version":"1.5.0","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","_id":"@arivlabs/logger@1.5.0","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"dist":{"shasum":"53e44be5cadb13f9fa743a8f00c5a247bd12ce26","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-1.5.0.tgz","fileCount":12,"integrity":"sha512-GKy84TWNzmVN3jTUt0uR53hDp9Qr1fpy3UNp3eyFV/BH7IkoqEFpldoAi5VpQEbDEtOqd8sUJaXAB7OqvHu1dA==","signatures":[{"sig":"MEQCID4e9+uwO10LA6ZihW1PVVAn+LT/W02sBag9L3crTg1qAiARYefu6lkNnjjJaL0/RHkC6fmzzJZSLCY3P3jAyteM6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56616},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"gitHead":"ae96ee46f975c89324c4af32fc43dae2d6ae4ce1","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"repository":{"url":"git+https://github.com/ArivLabs/arivlabs-packages.git","type":"git","directory":"packages/logger"},"_npmVersion":"11.6.2","description":"Structured logging for Node.js services with CloudWatch support","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","dependencies":{"pino":"^9.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/logger_1.5.0_1768939653389_0.40676752144631223","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@arivlabs/logger","version":"2.0.0","description":"Structured logging for Node.js services with CloudWatch support, async mode, and automatic sensitive data redaction","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js"}},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"build":"tsc","dev":"tsc --watch","clean":"rm -rf dist","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"pnpm run build"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"pino":"^10.2.0"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2"},"peerDependencies":{"pino-pretty":"^13.0.0"},"peerDependenciesMeta":{"pino-pretty":{"optional":true}},"keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript","async-logging","redaction"],"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","repository":{"type":"git","url":"git+https://github.com/ArivLabs/arivlabs-packages.git","directory":"packages/logger"},"bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"gitHead":"a4a61c9c66d0038f13b786947cba7fee303dcb64","_id":"@arivlabs/logger@2.0.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-wWkPCXYUmcjB/B3l3Y3uNSsSIKrmNIHMg/UowPVyMKyajBVwrlHwPKYjCDO1aV2U5HpwQzKfiQB9D6kFLHeDmA==","shasum":"e34f2e96e065aabcb21bc2f0f28684abcdfb5a5a","tarball":"https://registry.npmjs.org/@arivlabs/logger/-/logger-2.0.0.tgz","fileCount":12,"unpackedSize":104712,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arivlabs%2flogger@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFDsqZyyeWJN8WSXRkOlbSEuaPuoRj8aA0DJ1o5BkT1TAiALolCRaSG0qafKiz4myikwJMv1l65edXGfUP1+2i6Ssw=="}]},"_npmUser":{"name":"varun-arivlabs","email":"varun@arivlabs.com"},"directories":{},"maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_2.0.0_1769844329713_0.9602855271173909"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-23T04:48:13.384Z","modified":"2026-01-31T07:25:30.152Z","1.0.0":"2025-12-23T04:48:13.619Z","1.1.0":"2025-12-23T05:16:10.281Z","1.2.0":"2025-12-23T05:26:21.194Z","1.3.0":"2025-12-23T05:33:17.290Z","1.4.0":"2025-12-23T07:00:29.558Z","1.4.1":"2025-12-29T13:16:35.481Z","1.5.0":"2026-01-20T20:07:33.555Z","2.0.0":"2026-01-31T07:25:29.864Z"},"bugs":{"url":"https://github.com/ArivLabs/arivlabs-packages/issues"},"author":{"name":"ArivLabs","email":"hello@arivlabs.com"},"license":"MIT","homepage":"https://github.com/ArivLabs/arivlabs-packages/tree/main/packages/logger#readme","keywords":["logging","pino","cloudwatch","structured-logging","nodejs","typescript","async-logging","redaction"],"repository":{"type":"git","url":"git+https://github.com/ArivLabs/arivlabs-packages.git","directory":"packages/logger"},"description":"Structured logging for Node.js services with CloudWatch support, async mode, and automatic sensitive data redaction","maintainers":[{"name":"varun-arivlabs","email":"varun@arivlabs.com"}],"readme":"# @arivlabs/logger\n\nStructured, high-performance logging for Node.js services with CloudWatch support.\n\n## Features\n\n- **Async by default in production** - Non-blocking logging for maximum throughput\n- **Crash-safe logging** - Uses `pino.final()` for guaranteed delivery on exceptions\n- **Flexible types** - Define your own service and domain types locally\n- **Automatic redaction** - Sensitive data masked by default\n- **Child loggers** - Domain-specific and request-scoped logging\n- **CloudWatch-friendly** - JSON output optimized for AWS CloudWatch Insights\n- **Pino v10** - Built on the fastest Node.js logger\n\n## Installation\n\n```bash\npnpm add @arivlabs/logger\n\n# Optional: for pretty printing in development\npnpm add -D pino-pretty\n```\n\n## Quick Start\n\n```typescript\nimport { createLogger } from '@arivlabs/logger';\n\nconst logger = createLogger({ service: 'my-service' });\n\n// Basic logging (intuitive style)\nlogger.info('Server started', { port: 3000 });\n\n// Error logging - both { err } and { error } work\nlogger.error('Request failed', { err: error });\nlogger.error('Request failed', { error }); // Also works (auto-converted)\n\n// Domain-specific logging\nconst authLogger = logger.domain('auth');\nauthLogger.info('User logged in', { userId: '123' });\n\n// Request context logging\nconst reqLogger = logger.withContext({\n  correlationId: 'abc-123',\n  tenantId: 'tenant-1',\n  domain: 'discovery',\n});\nreqLogger.info('Processing request');\n\n// IMPORTANT: Graceful shutdown (required for async mode)\nprocess.on('SIGTERM', async () => {\n  await logger.shutdown();\n  process.exit(0);\n});\n```\n\n## Async Logging\n\nBy default, the logger uses **async mode in production** for high throughput:\n\n```typescript\nconst logger = createLogger({\n  service: 'my-service',\n  // enableAsync: true is default in production\n});\n\n// Logs are buffered and written asynchronously\nlogger.info('High volume log', { requestId: '123' });\n\n// CRITICAL: Always flush on shutdown!\nprocess.on('SIGTERM', async () => {\n  await logger.shutdown();\n  process.exit(0);\n});\n```\n\n### Async Defaults by Environment\n\n| Environment | `enableAsync` Default | Why                           |\n| ----------- | --------------------- | ----------------------------- |\n| production  | `true`                | High throughput, non-blocking |\n| development | `false`               | Immediate feedback during dev |\n| local       | `false`               | Immediate feedback            |\n| test        | `false`               | Predictable test output       |\n\n### Disabling Async Mode\n\n```typescript\nconst logger = createLogger({\n  service: 'my-service',\n  enableAsync: false, // All logs written synchronously\n});\n```\n\n### Async Configuration\n\n```typescript\nconst logger = createLogger({\n  service: 'my-service',\n  enableAsync: true,\n  asyncBufferSize: 4096, // Buffer size before auto-flush (default: 4096)\n});\n```\n\n## Exception Handling (Opt-in)\n\nFor crash-safe logging of uncaught exceptions, enable `handleExceptions`:\n\n```typescript\nconst logger = createLogger({\n  service: 'my-service',\n  handleExceptions: true, // Registers uncaughtException/unhandledRejection handlers\n});\n```\n\nWhen enabled, the logger:\n\n1. Logs the error at `fatal` level\n2. Calls `flushSync()` on the SonicBoom destination to ensure the log is written\n3. Exits the process with code 1\n\n**Note:** This is opt-in because automatic process exit behavior may not be desired in all applications.\n\n## Configuration\n\n```typescript\nconst logger = createLogger({\n  // Required\n  service: 'my-service',\n\n  // Optional\n  environment: 'production', // defaults to ENV or NODE_ENV\n  level: 'info', // defaults to 'debug' in dev, 'info' in prod\n  pretty: false, // defaults to true in development/local\n  enableAsync: true, // defaults to true in production\n  asyncBufferSize: 4096, // buffer size for async mode\n  handleExceptions: false, // opt-in for crash-safe logging\n\n  // Custom base fields (added to every log)\n  base: {\n    version: '2.0.0',\n    region: 'us-east-1',\n  },\n\n  // Custom redaction paths (in addition to defaults)\n  redact: {\n    paths: ['user.ssn', 'payment.cardNumber'],\n    censor: '[MASKED]', // default: '[REDACTED]'\n    remove: false, // set true to remove key entirely\n  },\n});\n```\n\n## Sensitive Data Redaction\n\nThe logger automatically masks common sensitive fields:\n\n### Default Redacted Fields\n\n| Category            | Fields                                                |\n| ------------------- | ----------------------------------------------------- |\n| **Secrets**         | `password`, `secret`, `token`, `apiKey`, `privateKey` |\n| **Auth Tokens**     | `accessToken`, `refreshToken`, `sessionToken`         |\n| **AWS Credentials** | `secretAccessKey`, `credentials.*`                    |\n| **Request Headers** | `req.headers.authorization`, `req.headers.cookie`     |\n| **Nested**          | `*.password`, `*.secret`, `*.token`, `*.apiKey`       |\n\n### Adding Custom Redaction\n\n```typescript\nconst logger = createLogger({\n  service: 'my-service',\n  redact: {\n    paths: ['user.ssn', 'payment.cardNumber', '*.bankAccount'],\n  },\n});\n```\n\n## Log Output Format\n\n**JSON (production):**\n\n```json\n{\n  \"level\": 30,\n  \"timestamp\": \"2026-01-21T10:30:00.000Z\",\n  \"service\": \"my-service\",\n  \"environment\": \"production\",\n  \"domain\": \"auth\",\n  \"correlation_id\": \"abc-123\",\n  \"tenant_id\": \"tenant-1\",\n  \"msg\": \"User logged in\",\n  \"userId\": \"user-456\"\n}\n```\n\n**Pretty (development):**\n\n```\n10:30:00 Z [my-service:auth] abc-123 User logged in\n```\n\n## CloudWatch Insights Queries\n\n```sql\n-- Filter by service\nfields @timestamp, @message | filter service = \"my-service\"\n\n-- Filter by domain\nfields @timestamp, @message | filter domain = \"auth\"\n\n-- Filter errors (level 50 = error)\nfields @timestamp, @message | filter level >= 50\n\n-- Filter by tenant\nfields @timestamp, @message | filter tenant_id = \"tenant-123\"\n\n-- Trace a request\nfields @timestamp, service, domain, @message\n| filter correlation_id = \"abc-123\"\n| sort @timestamp asc\n```\n\n## Error Logging\n\nPass the Error object directly:\n\n```typescript\ntry {\n  await someOperation();\n} catch (error) {\n  // Both work - error is auto-converted to err\n  logger.error('Operation failed', { err: error });\n  logger.error('Operation failed', { error }); // Same result\n\n  // Bad - loses error type, stack, and custom properties\n  logger.error('Operation failed', { message: error.message });\n}\n```\n\nPino's error serializer captures:\n\n- Error name/type (e.g., `TypeError`, `ValidationError`)\n- Error message\n- Full stack trace\n- Custom error properties\n\n## API Reference\n\n### `createLogger(config)`\n\nCreates a new logger instance.\n\n### `ArivLogger` Interface\n\n| Method                  | Description                                |\n| ----------------------- | ------------------------------------------ |\n| `trace(msg, data?)`     | Log at trace level                         |\n| `debug(msg, data?)`     | Log at debug level                         |\n| `info(msg, data?)`      | Log at info level                          |\n| `warn(msg, data?)`      | Log at warn level                          |\n| `error(msg, data?)`     | Log at error level                         |\n| `fatal(msg, data?)`     | Log at fatal level                         |\n| `domain(name)`          | Create child logger for domain             |\n| `withContext(ctx)`      | Create child logger with request context   |\n| `child(bindings)`       | Create child logger with custom bindings   |\n| `isLevelEnabled(level)` | Check if level is enabled                  |\n| `flush()`               | Synchronously flush buffered logs          |\n| `shutdown()`            | Flush and close (call before process exit) |\n| `pino`                  | Access underlying Pino logger              |\n\n## Migration from v1.x\n\n### Breaking Changes\n\n1. **Async logging is now default in production**\n   - Add shutdown handler: `await logger.shutdown()`\n\n2. **`ServiceName` and `LogDomain` types removed**\n   - Define your own types locally\n\n3. **Config option renamed**: `async` → `enableAsync`\n\n4. **Exception handling is now opt-in**\n   - Use `handleExceptions: true` if needed\n\n### Migration Steps\n\n```typescript\n// Before (v1.x)\nconst logger = createLogger({ service: 'api-gateway' });\n\n// After (v2.x)\nconst logger = createLogger({ service: 'my-service' });\n\n// Add shutdown handler (required for async mode)\nprocess.on('SIGTERM', async () => {\n  await logger.shutdown();\n  process.exit(0);\n});\n```\n\n## Performance Tips\n\n1. **Use `isLevelEnabled` for expensive computations:**\n\n   ```typescript\n   if (logger.isLevelEnabled('debug')) {\n     logger.debug('Details', { data: computeExpensiveData() });\n   }\n   ```\n\n2. **Keep log messages short** - data goes in the object:\n\n   ```typescript\n   // Good\n   logger.info('Request processed', { userId, duration, status });\n\n   // Bad\n   logger.info(`Request for user ${userId} took ${duration}ms with status ${status}`);\n   ```\n\n3. **Reuse domain loggers:**\n\n   ```typescript\n   // Good - create once, reuse\n   const authLogger = logger.domain('auth');\n   authLogger.info('Login');\n   authLogger.info('Logout');\n\n   // Bad - wasteful\n   logger.domain('auth').info('Login');\n   logger.domain('auth').info('Logout');\n   ```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}