{"_id":"@a14313/logger","_rev":"8-c87c31e0ff4ced8ab474c53b6940510e","name":"@a14313/logger","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.3":{"name":"@a14313/logger","version":"1.0.3","keywords":["logger","pino logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.0.3","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"de233e0bde4a1af1a40ad38b19ac19f10cc1e111","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.0.3.tgz","fileCount":4,"integrity":"sha512-C1OFmbIjS1QkUHUV/Vx/WIauSGcCPdQL6GnK5WWsF3H4ahibQxpZazeApdEpZ5sGLyYSl7FJ1CU3tWLThrzQOA==","signatures":[{"sig":"MEUCIAixY9eoP1xY3z50Mv6E7G/kiXl30Slu+mpe2xzCG2ULAiEA43s8F3//Ysl80r6gJFRwkaKP7k1FOtJmO2DRaaxRYYw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7658},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"82e858c73106d818b66e9d57ee066142aac3faa7","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.3_1764434968587_0.751304794874186","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@a14313/logger","version":"1.0.4","keywords":["logger","pino logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.0.4","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"35be3ff4b6306d73324928df1967c8f79aefa5d5","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.0.4.tgz","fileCount":4,"integrity":"sha512-deYaaqq03JAaSOT2DPcQ5LVZRw3ePJXd6KY/UMTkGBWGkjJJ2DumFP4gUpjQ4dhN8nqL2WLcT3UWkzTD6KniIw==","signatures":[{"sig":"MEYCIQDMQsNu5NWId8IudSQkp80lfw9bvOYBPhtUGQbX4AUK2AIhAKVNDckMu+TkWcS4Adqi31ewe4IlELgzQ/rzq1reZTiC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8212},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"dcec086fa959d0a263b7d2c4f919e69aec270348","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.4_1764436400923_0.25020011556081023","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@a14313/logger","version":"1.0.5","keywords":["logger","pino logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.0.5","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"d89a8b42679cd49bffa828c16039d8b5cfdbeebb","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.0.5.tgz","fileCount":4,"integrity":"sha512-JSJeksMlMtG82/Ls7KUJLsAMdr5bbcVZjkHi6AkdZqZApraELu1J8Nry61tp1E1mN80jCchg+GolaNhp7xjTQg==","signatures":[{"sig":"MEUCIFTJyNsoqyS4szkQdIBoxNOzdtH7ywOk5OSGZ08xeVdXAiEA/ccbgADk7mi22ZrvemX1sa/IkLoS5Ui+gxUUBEY4sNc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8918},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"937b6e57f0c5f5dcc9bcca5c1ff301a1872ec526","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.5_1764556209507_0.666596003667854","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@a14313/logger","version":"1.0.6","keywords":["logger","pino logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.0.6","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"71ef0da3e30b514ef0032d372b1145429937cce9","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.0.6.tgz","fileCount":4,"integrity":"sha512-jwIIyMnE8TnZvWNLnY+gZXX7SCrxXFyr6+j+WogmTRPQHu/CCVjtvmEG6glQbP9ZOP5wFSXQRHwC9YiW5ISlbA==","signatures":[{"sig":"MEQCIHzivp6IB90VQLs7U5TyxLH6q6bw7NCluILsPdYRUqWrAiAKqzr9dni9w7z9L5TZe997mtUAQb3GUL6Ene75lYZmfw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9405},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"6acf7dfe6fbd6104699242769691469f0d51a98e","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.6_1764559768905_0.7093882925979118","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@a14313/logger","version":"1.1.0","keywords":["logger","pino logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.1.0","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"e00605dbffdf2a39f1dbb1e5c5c53a6ad81cf725","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.1.0.tgz","fileCount":4,"integrity":"sha512-8VI0ER0Tj5nOlu4K9ns8Rp7L9P+bS6BrhoXL+Raiib2VNbAC68PfDzNstxeGjN54e9qcN97WvyDKym3Vk4lKxw==","signatures":[{"sig":"MEYCIQCENVGiHmLtSeAMQBOCEtxCRDpIyWWJnKvk7jm6kcckjgIhAJAZJARRwLW8Sg8R1qjXypyrx5tx2k6EomdWvP+LFR9Q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12725},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"31bf8f417be9bafacc226c133f328faf40cbf838","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.1.0_1764579221881_0.10320306038388782","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@a14313/logger","version":"1.2.0","keywords":["logger","pino-logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.2.0","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"f4cbde0607b795f5519c67df21cd85984e141054","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.2.0.tgz","fileCount":4,"integrity":"sha512-kNYOdGvgV+Goe2jKPkjRxhB/R9oN7V6T+CowmCcS4gX+sctVLyqzipG4B9rYytX/VpdT5K2J8182qBsdGdWVTQ==","signatures":[{"sig":"MEUCIEvEP8RMnwTTSVtYeQOV96iF6o4W9RrNV7qRDPAK15D+AiEAwlkUEpjbULqVT4Xwn/r2MJbVRe5ellW2JLGuCkqCAv0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13576},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a64f61b6bd5b930eadc8ed9b54b57ae8177d4c38","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"24.10.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","nanoid":"^5.1.6","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.2.0_1764727826914_0.18352882628997724","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@a14313/logger","version":"1.3.0","keywords":["logger","pino-logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","_id":"@a14313/logger@1.3.0","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"homepage":"https://github.com/A14313/logger#readme","bugs":{"url":"https://github.com/A14313/logger/issues"},"dist":{"shasum":"28e53acff2ce40f080112b65e9fc00840f04a69e","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.3.0.tgz","fileCount":4,"integrity":"sha512-IjSVafTo+NLKgm7P+FgHadC0POoVi7qWUZnIZqKiqacw1c4g+VSdiuh8tilDqNAYT69LNTEIfeBs+F9ehqLhkQ==","signatures":[{"sig":"MEUCIH7oI66NoBj9D8c/upBUctKOW1wTWfMY3vsQtkxjgle+AiEA02M/asEF8A8SCsbqujA3X2Nkay1wb7JUrXusVtWkJ1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13514},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"af3b8804afc95121296a29268fd29a43ff03365e","scripts":{"pack":"npm pack","test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"repository":{"url":"git+https://github.com/A14313/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","directories":{},"_nodeVersion":"22.16.0","dependencies":{"pino":"^10.1.0","dotenv":"^17.2.3","nanoid":"^5.1.6","pino-pretty":"^13.1.2"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","prettier":"^3.7.1","typescript":"^5.9.3","@types/node":"^24.10.1","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.3.0_1765360028144_0.6046941878317105","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@a14313/logger","version":"1.3.1","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup","format":"prettier --write \"src/**/*.{ts,js,json}\"","pack":"npm pack","release":"npm run build && mkdir -p releases && npm run pack && mv *.tgz releases/"},"repository":{"type":"git","url":"git+https://github.com/A14313/logger.git"},"keywords":["logger","pino-logger"],"author":{"name":"https://github.com/A14313"},"license":"ISC","bugs":{"url":"https://github.com/A14313/logger/issues"},"homepage":"https://github.com/A14313/logger#readme","description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","dependencies":{"dotenv":"^17.2.3","nanoid":"^5.1.6","pino":"^10.1.0","pino-pretty":"^13.1.2"},"devDependencies":{"@changesets/cli":"^2.29.8","@types/node":"^24.10.1","prettier":"^3.7.1","tsup":"^8.5.1","typescript":"^5.9.3"},"engines":{"node":">=18.0.0"},"engineStrict":true,"gitHead":"86760a6e87a00f1b4ee5109f9de6abe75bc9e412","_id":"@a14313/logger@1.3.1","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-vY2uZDq4Ku7IgFVIG5RBZeszeTyt9DIBmgcrTBJr5kWflelLLrlcda+Pm5+O971f60B0jK17ASKyHEE9dh8pig==","shasum":"7a6aa83c51dd8401da7a9719ebe500b771d9507e","tarball":"https://registry.npmjs.org/@a14313/logger/-/logger-1.3.1.tgz","fileCount":4,"unpackedSize":13660,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCDjX6DbEQdDm8j+zdMsPGQ+dzXpXMQ37z0wdWwc+4ZPQIhAJuSAFfrh2T4XLAgVSAXHDBpPCDul+ma2pFasNm6bfIu"}]},"_npmUser":{"name":"carloautor","email":"carloautor@gmail.com"},"directories":{},"maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_1.3.1_1765418519538_0.44135096884432024"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-29T16:49:28.533Z","modified":"2025-12-11T02:01:59.924Z","1.0.3":"2025-11-29T16:49:28.802Z","1.0.4":"2025-11-29T17:13:21.163Z","1.0.5":"2025-12-01T02:30:09.684Z","1.0.6":"2025-12-01T03:29:29.105Z","1.1.0":"2025-12-01T08:53:42.049Z","1.2.0":"2025-12-03T02:10:27.102Z","1.3.0":"2025-12-10T09:47:08.291Z","1.3.1":"2025-12-11T02:01:59.718Z"},"bugs":{"url":"https://github.com/A14313/logger/issues"},"author":{"name":"https://github.com/A14313"},"license":"ISC","homepage":"https://github.com/A14313/logger#readme","keywords":["logger","pino-logger"],"repository":{"type":"git","url":"git+https://github.com/A14313/logger.git"},"description":"A lightweight, zero-config wrapper for pino, the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logg","maintainers":[{"name":"carloautor","email":"carloautor@gmail.com"}],"readme":"[![npm version](https://img.shields.io/npm/v/@a14313/logger)](https://www.npmjs.com/package/@a14313/logger)\r\n\r\n# @a14313/logger\r\n\r\nA lightweight, zero-config wrapper for [pino](https://www.npmjs.com/package/pino), the fastest Node.js logger. Get a production-ready logger instance instantly with sensible defaults, automatic pretty-printing in development, and built-in context, allowing you to skip the setup and start logging immediately.\r\n\r\n## Installation\r\n\r\n### NPM\r\n\r\n```bash\r\nnpm i @a14313/logger\r\n```\r\n\r\n### PNPM\r\n\r\n```bash\r\npnpm i @a14313/logger\r\n```\r\n\r\n## Usage\r\n\r\n**By default, you don't need to instantiate the logger**. When you import the `logger`, it is automatically instantiated. However, you can import the `Logger` class if you want to instantiate it yourself. Example: `const newLogger = new Logger();`. But to make it simpler, just use the `logger` with the small `L`.\r\n\r\n---\r\n\r\n### Setup\r\n\r\nSet these variables to your environment:\r\n\r\n```env\r\nLOG_LEVEL=debug\r\nNODE_ENV=dev\r\n```\r\n\r\nLOG_LEVEL can have these values: debug | info | warn | error | fatal\r\n\r\nNODE_ENV can have these values: dev | development | prod | prd | production\r\n\r\n### CommonJS\r\n\r\n```javascript\r\nconst logger = require('@a14313/logger');\r\n\r\nlogger.debug('This is debug');\r\n\r\nlogger.info('This is info with extra data', {\r\n\tfoo: 'bar',\r\n\tbaz: 1,\r\n\tbool: true,\r\n});\r\n\r\nlogger.warn('This is Warning!');\r\n\r\nlogger.error('This is Error!');\r\n\r\nlogger.fatal('This is Fatal!');\r\n```\r\n\r\n### ESM Modules\r\n\r\nIf you are having issues importing it from Typescript or ES6 codes, go to the [troubleshooting guide](#fixing-some-issues-with-the-typescript).\r\n\r\n```typescript\r\nimport logger from '@a14313/logger';\r\n\r\nlogger.debug('This is debug');\r\n\r\nlogger.info('This is info with extra data', {\r\n\tfoo: 'bar',\r\n\tbaz: 1,\r\n\tbool: true,\r\n});\r\n\r\nlogger.warn('This is Warning!');\r\n\r\nlogger.error('This is Error!');\r\n\r\nlogger.fatal('This is Fatal!');\r\n```\r\n\r\n## Sample output\r\n\r\n### Development\r\n\r\n![Dev Logs](./assets/dev_logs.jpg)\r\n\r\n```bash\r\n[2025-12-03 01:45:35.835 UTC] DEBUG (17472 on LPHLIFEFS8ZDY3): BAx1cWEBAjVzO_wDjvvXw This is debug\r\n[2025-12-03 01:45:35.837 UTC] INFO (17472 on LPHLIFEFS8ZDY3): xNjfGrcjM_nHF3FWOM-8L This is info with extra data\r\n    data: {\r\n      \"foo\": \"bar\",\r\n      \"baz\": 1,\r\n      \"bool\": true\r\n    }\r\n[2025-12-03 01:45:35.837 UTC] WARN (17472 on LPHLIFEFS8ZDY3): qxRedJg6X3ve_OA5a3Xun This is Warning!\r\n[2025-12-03 01:45:35.837 UTC] ERROR (17472 on LPHLIFEFS8ZDY3): xa1Vc93OKNcq9p14-3X3m This is Error!\r\n[2025-12-03 01:45:35.837 UTC] FATAL (17472 on LPHLIFEFS8ZDY3): XeLmK1E3YY-kPGBehiYG3 This is Fatal!\r\n```\r\n\r\n### Production\r\n\r\n![Prod Logs](./assets/prod_logs.jpg)\r\n\r\n```bash\r\n{\"level\":20,\"time\":\"2025-12-03T01:46:58.616Z\",\"pid\":36532,\"hostname\":\"LPHLIFEFS8ZDY3\",\"traceId\":\"oiZ0bVy86qimGtk_KYXSC\"\r\n,\"msg\":\"This is debug\"}\r\n{\"level\":30,\"time\":\"2025-12-03T01:46:58.618Z\",\"pid\":36532,\"hostname\":\"LPHLIFEFS8ZDY3\",\"traceId\":\"swux-WaDziXWy_jcCP_Y1\"\r\n,\"msg\":\"This is info with extra data\",\"data\":{\"foo\":\"bar\",\"baz\":1,\"bool\":true}}\r\n{\"level\":40,\"time\":\"2025-12-03T01:46:58.618Z\",\"pid\":36532,\"hostname\":\"LPHLIFEFS8ZDY3\",\"traceId\":\"LxFi797eny5F7-2UcQ2EY\"\r\n,\"msg\":\"This is Warning!\"}\r\n{\"level\":50,\"time\":\"2025-12-03T01:46:58.618Z\",\"pid\":36532,\"hostname\":\"LPHLIFEFS8ZDY3\",\"traceId\":\"7NgeGuNWdIOt6xnT7-20K\"\r\n,\"msg\":\"This is Error!\"}\r\n{\"level\":60,\"time\":\"2025-12-03T01:46:58.618Z\",\"pid\":36532,\"hostname\":\"LPHLIFEFS8ZDY3\",\"traceId\":\"lsp3XCMfEWGYvv3IrFN5-\"\r\n,\"msg\":\"This is Fatal!\"}\r\n```\r\n\r\n## Instantiating your own Logger\r\n\r\nIf you decided to instantiate your Logger, you can override the defaults.\r\n\r\n`const myLogger = new Logger({options})`\r\n\r\n### Options\r\n\r\n| Parameter | Type      | Required | Default                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                |\r\n| :-------- | :-------- | :------- | :--------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| logLevel  | `String`  | No       | `info`                                                                                                           | These are the valid values for logLevel: `debug` \\| `info` \\| `warn` \\| `error` \\| `fatal`                                                                                                                                                                                                                                                                                                                                                 |\r\n| usePretty | `Boolean` | No       | Depends on the environment. If the environment set on the env is `prod`, the default is `false` otherwise `true` | This will override the default logger if it will use `json` or `pino-pretty` regardless of the environment. <br /> <br /> WARNING⚠️: It is not recommended to use pretty logs on prod. It is resource intensive and the log processors might not be able to read your logs properly.<br /> <br />Use this on dev environment only. Or better if you use the default, because it will automatically adjust depending on the environment. 😉 |\r\n\r\n```typescript\r\nconst { Logger } = require('@a14313/logger');\r\n\r\n// or\r\n// import { Logger } from '@a14313/logger';\r\n\r\nconst newLogger = new Logger({\r\n\tlogLevel: 'info',\r\n\tusePretty: true,\r\n});\r\n\r\nnewLogger.debug('This is debug');\r\nnewLogger.info('This is info');\r\n```\r\n\r\n## Integration with [pino-http](https://www.npmjs.com/package/pino-http) (For backend)\r\n\r\nWhen you need to integrate on `pino-http` to get the http requests, you need to configure the pino-http to use your existing logger. Just use the `logger.raw` or if you instantiated your own logger, `myNewLogger.raw` to use the installed logger `a14313/logger`, and that's it.\r\n\r\n```typescript\r\nconst logger = require('@a14313/logger');\r\n\r\npinoHttp({\r\n\tlogger: logger.raw,\r\n\t// ... The rest of the config\r\n});\r\n```\r\n\r\n## Fixing some issues with the Typescript\r\n\r\n> You can use this technique if you are having problems importing it. Otherwise, don't use this.\r\n\r\nIf you ever came to a point where you cannot import it properly on your typescript or ES6 project, that is because I exported this package with plain vanilla javascript in mind, for backwards compatibility. So that even on commonjs, you can use this.\r\n\r\n### Fix\r\n\r\n#### Solution 1\r\n\r\nFor maximum compatibility on typescript just add this on your `tsconfig.json`.\r\n\r\n```json\r\n{\r\n\t\"esModuleInterop\": true,\r\n\t\"allowSyntheticDefaultImports\": true\r\n}\r\n```\r\n\r\nThis will allow you to import like a native ES6.\r\n\r\n```typescript\r\nimport logger from '@a14313/logger';\r\n```\r\n\r\n---\r\n\r\n#### Solution 2\r\n\r\nIf you don't want to do the **Solution 1** or you cannot modify the **tsconfig**, try this instead:\r\n\r\n```typescript\r\n// First import the type of the Logger\r\nimport type { Logger } from '@a14313/logger';\r\n\r\n// Use the \"require\" syntax and add the type \"Logger\".\r\n// Then add this comment:\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-var-requires\r\nconst logger: Logger = require('@a14313/logger');\r\n\r\n// Then you can use the logger as it is:\r\nlogger.debug('Debug log');\r\nlogger.info('Info log');\r\n```\r\n\r\n## Author\r\n\r\nThe author of this API has an `author` to his name 😄.\r\n\r\n[Antonio Carlo Autor](https://github.com/A14313)\r\n","readmeFilename":"README.md"}