{"_id":"@aopslabs/xf-logger","_rev":"3-308d5e4a6aa88537fd2c7e7a463df92e","name":"@aopslabs/xf-logger","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@aopslabs/xf-logger","version":"0.2.0","keywords":["logger","pino","structured-logging","edge"],"author":"Mehmet Zeki Sönmez","license":"SEE LICENSE IN LICENSE","_id":"@aopslabs/xf-logger@0.2.0","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"dist":{"shasum":"fe262fee3e4e7efd48dfbd64ee8cc7424a59c8f3","tarball":"https://registry.npmjs.org/@aopslabs/xf-logger/-/xf-logger-0.2.0.tgz","fileCount":22,"integrity":"sha512-fgc+MrFB+dM3PyxB66S9HAoMJ1xmaJHULPNtrsPwlPdHXHWuWiI/rGEReIym0zYmsjJoZYJC6EGcL9+Ln/OEKw==","signatures":[{"sig":"MEYCIQDI9BohkWa1WH7zYCNaM4T8pJ81t0WEtxQ291D39/rxQgIhAKm6WH7O98PDl7nYKQtz48JErAkWdCNb8yw8xl/71LP4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25296},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","browser":"./dist/index.browser.js","default":"./dist/index.js"},"./edge":{"types":"./dist/index.browser.d.ts","import":"./dist/index.browser.js","default":"./dist/index.browser.js"},"./sync":{"types":"./dist/sync/index.d.ts","import":"./dist/sync/index.js","default":"./dist/sync/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"build":"tsc -p tsconfig.lib.json"},"_npmUser":{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"},"repository":{"url":"https://github.com/aopslab/xf-packages.git","type":"git"},"description":"Runtime-aware structured logging for Node.js, browser, and edge environments.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"pino":"^10.3.0","pino-loki":"^3.0.0","pino-pretty":"^13.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.3.0"},"_npmOperationalInternal":{"tmp":"tmp/xf-logger_0.2.0_1785852298830_0.7580079592276157","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aopslabs/xf-logger","version":"0.2.1","keywords":["logger","pino","structured-logging","edge"],"author":"Mehmet Zeki Sönmez","license":"SEE LICENSE IN LICENSE","_id":"@aopslabs/xf-logger@0.2.1","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"dist":{"shasum":"baaa72f5de3ac3166f3d329dda295d9da9e6353f","tarball":"https://registry.npmjs.org/@aopslabs/xf-logger/-/xf-logger-0.2.1.tgz","fileCount":22,"integrity":"sha512-7loLNa0JN28xBFRsdJZZffplGzy18zQjSvxs3npb7iu4D+OMaBgWKsY5a7qpeHImjmQkJCo+kZ4k/5E79+ZqZw==","signatures":[{"sig":"MEUCIQD0TIa72l9RHpAI39OxI1Irb47NFSgyieJapTgY9/ZjaQIgM94iAZaLSLzxv4LfQks+kMaisIdX1JQc/JHvNx5UN1c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25295},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","browser":"./dist/index.browser.js","default":"./dist/index.js"},"./edge":{"types":"./dist/index.browser.d.ts","import":"./dist/index.browser.js","default":"./dist/index.browser.js"},"./sync":{"types":"./dist/sync/index.d.ts","import":"./dist/sync/index.js","default":"./dist/sync/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"build":"tsc -p tsconfig.lib.json"},"_npmUser":{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"},"repository":{"url":"https://github.com/eeemzs/xf-packages.git","type":"git"},"description":"Runtime-aware structured logging for Node.js, browser, and edge environments.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"pino":"^10.3.0","pino-loki":"^3.0.0","pino-pretty":"^13.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.3.0"},"_npmOperationalInternal":{"tmp":"tmp/xf-logger_0.2.1_1785854071636_0.666824487056451","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aopslabs/xf-logger","version":"0.2.2","description":"Runtime-aware structured logging for Node.js, browser, and edge environments.","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","browser":"./dist/index.browser.js","import":"./dist/index.js","default":"./dist/index.js"},"./edge":{"types":"./dist/index.browser.d.ts","import":"./dist/index.browser.js","default":"./dist/index.browser.js"},"./sync":{"types":"./dist/sync/index.d.ts","import":"./dist/sync/index.js","default":"./dist/sync/index.js"}},"dependencies":{"pino":"^10.3.0","pino-loki":"^3.0.0","pino-pretty":"^13.0.0"},"devDependencies":{"@types/node":"25.3.0","eslint":"9.39.5","typescript":"5.9.3","@aopslabs/typescript-config":"0.0.0","@aopslabs/eslint-config":"0.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"private":false,"repository":{"type":"git","url":"git+https://github.com/eeemzs/tsapps.git","directory":"packages/xf-packages/xf-logger"},"author":{"name":"Mehmet Zeki Sönmez"},"keywords":["logger","pino","structured-logging","edge"],"license":"SEE LICENSE IN LICENSE","scripts":{"build":"tsc -p tsconfig.lib.json","lint":"eslint . --max-warnings=0"},"_id":"@aopslabs/xf-logger@0.2.2","bugs":{"url":"https://github.com/eeemzs/tsapps/issues"},"homepage":"https://github.com/eeemzs/tsapps#readme","_integrity":"sha512-Xl+tZQbIhtCYrMr7z8T4ElRVghrKfTUt5WfUiylwS0KTtBCHlUAas5wuEtNACkkncxExhr8uxj5YW2HPnlWrig==","_resolved":"/home/runner/work/_temp/release-candidates/aopslabs-xf-logger-0.2.2.tgz","_from":"file:/home/runner/work/_temp/release-candidates/aopslabs-xf-logger-0.2.2.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Xl+tZQbIhtCYrMr7z8T4ElRVghrKfTUt5WfUiylwS0KTtBCHlUAas5wuEtNACkkncxExhr8uxj5YW2HPnlWrig==","shasum":"705dc4685b734737ae219e8d7d3e65d8e506dd3e","tarball":"https://registry.npmjs.org/@aopslabs/xf-logger/-/xf-logger-0.2.2.tgz","fileCount":22,"unpackedSize":25488,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQWlgF5nlYuAGLSPTI2zUVJqflm90mojCZq9HYKjcEWAIhANL0+rH6oIxCbcFWBW64zYyncUaXixPKZrMvSCQEi1jg"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:42fda0ee-f9a2-438f-b779-b338467ced3e"}},"directories":{},"maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xf-logger_0.2.2_1788791244299_0.8539434555775232"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T14:04:58.610Z","modified":"2026-09-07T14:27:24.682Z","0.2.0":"2026-08-04T14:04:58.972Z","0.2.1":"2026-08-04T14:34:31.799Z","0.2.2":"2026-09-07T14:27:24.427Z"},"author":{"name":"Mehmet Zeki Sönmez"},"license":"SEE LICENSE IN LICENSE","keywords":["logger","pino","structured-logging","edge"],"repository":{"type":"git","url":"git+https://github.com/eeemzs/tsapps.git","directory":"packages/xf-packages/xf-logger"},"description":"Runtime-aware structured logging for Node.js, browser, and edge environments.","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"readme":"# @aopslabs/xf-logger\n\nRuntime-aware structured logging for Node.js, browser, and edge environments. The package is built on [Pino](https://getpino.io/) and exposes separate entrypoints for the default, edge, and synchronous logging surfaces.\n\n## Installation\n\n```bash\nnpm install @aopslabs/xf-logger\n```\n\n## Basic usage\n\n```javascript\nimport { createLogger, getParent } from '@aopslabs/xf-logger';\n\nconst logger = createLogger({\n  level: 'info',\n  printServerConsole: true,\n  base: { module: 'payments' }\n});\n\nconst childLogger = logger?.child({\n  module: 'invoice-service',\n  parent: getParent(logger)\n});\n\nchildLogger?.info({ invoiceId: 'inv-123' }, 'Invoice created');\n```\n\nSet `level` to `none` when logging must be disabled.\n\n## Runtime entrypoints\n\n| Import | Purpose |\n| --- | --- |\n| `@aopslabs/xf-logger` | Node.js-compatible logger with optional console, file, and Loki transports |\n| `@aopslabs/xf-logger/edge` | Browser and edge-safe logger without Node.js transports |\n| `@aopslabs/xf-logger/sync` | Synchronous pretty logger intended for tests and local tooling |\n\n## Configuration\n\n`createLogger` accepts these commonly used options:\n\n| Option | Description |\n| --- | --- |\n| `level` | `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `silent`, or `none` |\n| `printServerConsole` | Enable console output in Node.js |\n| `prettyConsole` | Format console output with `pino-pretty` |\n| `printFile` | Write logs to files in a Node.js runtime |\n| `path` | Directory for file logs; defaults to `./logs` |\n| `fileType` | `json` for JSON Lines or `txt` for formatted text |\n| `splitErrorWarn` | Write additional warning and error files |\n| `postLokiServer` | Enable the Loki transport |\n| `lokiConfig` | Loki host, credentials, and labels |\n| `browserAsObject` | Emit browser log records as objects |\n| `base` | Base fields included with each record |\n| `runtime` | Explicitly select `browser`, `nodejs`, or `edge` |\n\nSensitive fields such as passwords, tokens, secrets, credentials, and password hashes are redacted by default.\n\n## License\n\nCopyright (c) 2026 Mehmet Zeki Sönmez.\n\nLicensed under the [PolyForm Strict License 1.0.0](https://polyformproject.org/licenses/strict/1.0.0). The license permits noncommercial use and does not grant permission to modify or redistribute the package.\n","readmeFilename":"README.md","homepage":"https://github.com/eeemzs/tsapps#readme","bugs":{"url":"https://github.com/eeemzs/tsapps/issues"}}