{"versions":{"0.0.1":{"name":"@kirklin/logger","type":"module","version":"0.0.1","packageManager":"pnpm@7.12.2","description":"A simple JavaScript logging library that allows you to log messages with levels (Trace, Debug, Info, Warn, and Error)\r and optional fields and custom colors.","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","up":"taze major -r -w -I"},"devDependencies":{"@antfu/ni":"^0.19.0","@kirklin/eslint-config":"^0.2.5","@types/node":"^18.11.18","bumpp":"^8.2.1","eslint":"^8.32.0","esno":"^0.16.3","pnpm":"^7.26.1","rimraf":"^4.1.2","taze":"^0.8.5","typescript":"^4.9.4","unbuild":"^1.1.1","vite":"^4.0.4","vitest":"^0.28.3"},"gitHead":"424b5d2ccf0f9e04ecbddae66c9f462d79649a71","_id":"@kirklin/logger@0.0.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-RSnBSl0U/xQwzRDu5nxW7fjZs052gjJrd6Ov28WXM3Wku0R6veaIOz0XAQg7TawZiTDgJsz+QysPQd/kJQ+RMQ==","shasum":"1d06076a0aa64ce27a82242490e8dfe240b13d9e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.0.1.tgz","fileCount":6,"unpackedSize":25059,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUR/DocyaOK+K5anmFKmEZOq9J1b8VHAFP/uvC5xm2VAiB/CPwwDkKWarh8aaQpYcBp7i0qh9S5n9AFU0vLKVOQ2g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj14PkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrwsw/+NrJW7FxDG4BXHsgXUyCZd5kILix1OqGOulH2jcB6iLPNc1Hg\r\nMYSaklyJGdcbLLEGVbXmJV55EOeLEQk7mE2eiLuiuSAPwBcbW8lV9ECwFFgh\r\nS+hIafha1t65h4AfEVMD5eTXyrNIWSMtUoQpjKHTK8ENnoXdGBo3UceFPwvh\r\nMGujXwkYGY7c0uhPo3L0XIZ7EpSXUILo+CfT+bSjGErahlo2ukxzSi+CtP15\r\nczITYYGy+opkXSFH+3kRExHZQeNMd2CmIRHgGFyVHvPIP+w+1rsCixh8nXM7\r\n2sheCKTvbZEjzUg9pWdnfPyblZd0mJkWon4/KcLp8RfbVb/N4qiXYD1Qz9pz\r\nKaGBkRF4d/la66cPGSljTJCYsQaX4IyuGnsqhmoU298xPeGvXqBVPaqAJuqu\r\nWTMQ1IdJzgPXdlBZblTaJ4gwA4CZT8+k/wnJvBQ5Gp9cfSntC8RZVeIAkddk\r\ngcmhr+GKpuxZ07ppX0ug6runqNnS5AooDA7Gq6p6ZG76AX5a4V9gOMpyXyY1\r\nprzz66C7Vy+x++JpJWjurqK5j5tuBcHfFDxy1q5+zTh7k4+1Cl4hr/6X5znJ\r\nQnn6THmBBOjhiJ5W3Ce4LTMJ1mmC+q0Pbz4gTSLmJs/ryvcUX/CpgYDe6FKz\r\n7G84ikOswelgM+eHLm0hvFfOLLDHjM8KFBY=\r\n=Mxng\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anonymous","email":"linkirk@163.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logger_0.0.1_1675068388349_0.48786710329970573"},"_hasShrinkwrap":false,"contributors":[]},"0.0.2":{"name":"@kirklin/logger","type":"module","version":"0.0.2","packageManager":"pnpm@7.12.2","description":"A simple JavaScript logging library that allows you to log messages with levels (Trace, Debug, Info, Warn, and Error) and optional fields and custom colors.","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","prepublishOnly":"nr build","release":"bumpp && npm publish","start":"esno src/index.ts","test":"vitest","typecheck":"tsc --noEmit","up":"taze major -r -w -I"},"devDependencies":{"@antfu/ni":"^0.20.0","@kirklin/eslint-config":"^0.2.7","@types/node":"^18.14.6","bumpp":"^9.0.0","eslint":"^8.35.0","esno":"^0.16.3","pnpm":"^7.29.1","rimraf":"^4.3.1","taze":"^0.9.0","typescript":"^4.9.5","unbuild":"^1.1.2","vite":"^4.1.4","vitest":"^0.29.2"},"gitHead":"c84207ab434371709842fc8f39466789d99e8a8e","_id":"@kirklin/logger@0.0.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-CGZ9HGmHGTcGnU8CDQm7RR7hZgxLyRHTIFpS1FDCQkVaipdL/poq72ibpKqqQflomgKRCYV6GReP7ZXEZeDx1w==","shasum":"b24dd100c95e4d0b2c880b0ef4933e9d5660bfe5","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.0.2.tgz","fileCount":6,"unpackedSize":26862,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVJY6I6sWnnQ/XODcoaDDmg7MDf+YNrDWXIu66JrDMnAIhALs2/fQ5A+7g1tZckZv6dpHmkVb51otyd6WVEOXL7pg3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCJPdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmouig/9HA4M/XqmUht9VmFQRePL92a5pGO+RS+YhPZgf0ZfrDUq/CQK\r\neDSMqckUAsZJg89csFnDKKUlbKjZlkQI1+ceA4PQorTIon20x4hRamQSItAw\r\nKgudFkOcc2bfhoQ91qMIZPWT8cawg1T794FK3SDVSK78Oj29FU6jahCXVsKD\r\nwK6ErSJXwc6CQDuoeRntQn8uUWkh2PXzIlx6gxC955qsPXFkNwqH2Usltjh5\r\npHl5DIKZc3QBEpzlhTHPg2XJZUwAcrKXKQo7E4zVeF6QqEgsEw6JHFLNQMan\r\nfhiqVSBMJr8/L5IoZYNOSwc9NaNa/x/LbskinowcEGmM7lvbU/pJVraVm3XV\r\ndZ/H+sjbJ1SheWXP8wQlG6DdgOYDLgplpziKgFMN/WkwWjZ7nMGTEkyPnY+B\r\nkAGBS7QOdYaNVyYJg+Vyjjb3+uJ+DTh+buWq9yrWVMZ76aLLtU0tE8y0c8aW\r\nXFB7rAgQn2XsOzk4Bg/ujlTEO8sbjJG+fejoFfGvkyGSVFVofMGwEREJuPl0\r\nsyc+R9Xh0YZitsiDDwtx7CecWZaoCgHR2d2/VDs8cdp22fVsbnb4rFoO8UAG\r\n7KsrTihkWnzPjmVgCTdOwcc9HFE5mbt+qrrdjMc0fS2BeqLzEfsN40r7FFSM\r\nMAv3f3XLTcRNlGZB8MLrb3IqqqTTNcdBwRA=\r\n=Lx0V\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anonymous","email":"linkirk@163.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logger_0.0.2_1678283741643_0.32186190510706414"},"_hasShrinkwrap":false,"contributors":[]},"0.0.3":{"name":"@kirklin/logger","type":"module","version":"0.0.3","description":"_description_","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":"./dist/index.mjs"},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","devDependencies":{"@antfu/ni":"^25.0.0","@kirklin/eslint-config":"^5.0.0","@types/node":"^24.0.6","bumpp":"^10.2.0","eslint":"^9.30.0","esno":"^4.8.0","lint-staged":"^16.1.2","pnpm":"^10.12.4","rimraf":"^6.0.1","simple-git-hooks":"^2.13.0","taze":"^19.1.0","typescript":"^5.8.3","unbuild":"^3.5.0","vite":"^7.0.0","vitest":"^3.2.4"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","postinstall":"npm run build","release":"bumpp","start":"esno src/index.ts","play":"vite playground","test":"vitest","typecheck":"tsc --noEmit","up":"taze latest -r -w -I"},"_id":"@kirklin/logger@0.0.3","_integrity":"sha512-mI2mHldCrcf+de4cW28moRwKbmPHe6ZcTw0C7mEY85sU7FugR8/mPm+bRcVh8CqEIqH1kIuP2bsBT7BKu/qa1g==","_resolved":"/private/var/folders/qs/16__nw6n7wn3v6cprtzvg4qc0000gn/T/08349e6172eeba33c69561f3016e0ebc/kirklin-logger-0.0.3.tgz","_from":"file:kirklin-logger-0.0.3.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-mI2mHldCrcf+de4cW28moRwKbmPHe6ZcTw0C7mEY85sU7FugR8/mPm+bRcVh8CqEIqH1kIuP2bsBT7BKu/qa1g==","shasum":"e2a31279b5aba5b3aca41543c2d5d58f2745c67a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.0.3.tgz","fileCount":6,"unpackedSize":23165,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH2ndV8Z8k9eOiIwI1hi6oZwngG2yKhCZ2p8Fwqv8408AiAPqJowt3Wfvik5TwTlJE88GVHZZdw9sYFOgF4NdyUdKg=="}],"size":6003},"_npmUser":{"name":"anonymous","email":"linkirk@163.com","actor":{"name":"kirklin","email":"linkirk@163.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.0.3_1751686446579_0.7759834345765073"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-05T03:34:06.780Z","publish_time":1751686446780,"_source_registry_name":"default","hasInstallScript":true,"contributors":[]},"0.0.5":{"name":"@kirklin/logger","type":"module","version":"0.0.5","description":"_description_","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":"./dist/index.mjs"},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","devDependencies":{"@antfu/ni":"^25.0.0","@kirklin/eslint-config":"^5.0.0","@types/node":"^24.0.6","bumpp":"^10.2.0","eslint":"^9.30.0","esno":"^4.8.0","lint-staged":"^16.1.2","pnpm":"^10.12.4","rimraf":"^6.0.1","simple-git-hooks":"^2.13.0","taze":"^19.1.0","typescript":"^5.8.3","unbuild":"^3.5.0","vite":"^7.0.0","vitest":"^3.2.4"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","postinstall":"npm run build","release":"bumpp","start":"esno src/index.ts","play":"vite playground","test":"vitest","typecheck":"tsc --noEmit","up":"taze latest -r -w -I"},"_id":"@kirklin/logger@0.0.5","_integrity":"sha512-+eru4f6W6xt4Q+A0HoYow50BpzUr4pFq4pxFOAeKiv64fDZBDkoYlzvw9DvRk9sPrvZu5sHacpuQIzNJaX3IeQ==","_resolved":"/private/var/folders/qs/16__nw6n7wn3v6cprtzvg4qc0000gn/T/15b8ea6ab15883b997c004a3de7f23f7/kirklin-logger-0.0.5.tgz","_from":"file:kirklin-logger-0.0.5.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-+eru4f6W6xt4Q+A0HoYow50BpzUr4pFq4pxFOAeKiv64fDZBDkoYlzvw9DvRk9sPrvZu5sHacpuQIzNJaX3IeQ==","shasum":"49de1dfe1dbebfe4af9d0989c466d51cf9c75b9a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.0.5.tgz","fileCount":6,"unpackedSize":24856,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC7SAquMSvNDjrpRBV2e9jqlnUMOb/fnRfMSwyKEo/ECQIgCE87XZLNoPlB5Wx2g8D5HFM5Dt2670yAahFGiIUohrA="}],"size":6394},"_npmUser":{"name":"anonymous","actor":{"name":"kirklin","type":"user","email":"linkirk@163.com"},"email":"linkirk@163.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.0.5_1751690258459_0.7045533096241454"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-05T04:37:38.652Z","publish_time":1751690258652,"_source_registry_name":"default","hasInstallScript":true,"contributors":[]},"0.1.0":{"name":"@kirklin/logger","type":"module","version":"0.1.0","description":"A modern, flexible, and elegant logger for Node.js and the browser.","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":"./dist/index.mjs"},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","devDependencies":{"@antfu/ni":"^25.0.0","@kirklin/eslint-config":"^5.0.0","@types/node":"^24.0.6","bumpp":"^10.2.0","eslint":"^9.30.0","esno":"^4.8.0","lint-staged":"^16.1.2","pnpm":"^10.12.4","rimraf":"^6.0.1","simple-git-hooks":"^2.13.0","taze":"^19.1.0","typescript":"^5.8.3","unbuild":"^3.5.0","vite":"^7.0.0","vitest":"^3.2.4"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","postinstall":"npm run build","release":"bumpp","start":"esno src/index.ts","play":"vite playground","test":"vitest","typecheck":"tsc --noEmit","up":"taze latest -r -w -I"},"_id":"@kirklin/logger@0.1.0","_integrity":"sha512-zKYevSL5H3u4dLOuRDSPvClUcIoKsBo01JKY9+peYps8UPu+P0KX4jyCPrTODPv9lLO7ChiohxDDpj/CucDT7w==","_resolved":"/private/var/folders/qs/16__nw6n7wn3v6cprtzvg4qc0000gn/T/110b10d8541de597259a6bc8460fb330/kirklin-logger-0.1.0.tgz","_from":"file:kirklin-logger-0.1.0.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-zKYevSL5H3u4dLOuRDSPvClUcIoKsBo01JKY9+peYps8UPu+P0KX4jyCPrTODPv9lLO7ChiohxDDpj/CucDT7w==","shasum":"38df67950c6303e64800a7a08139c94db1e497b8","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.1.0.tgz","fileCount":6,"unpackedSize":34098,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGAtTnV/QB1xugI7BuFGyM0/2L46o6zXXfH6s1L69G0qAiBNjMNSvHV4tuAONCz5Tyxzc9m72YRTp5OqfYKqYHK4TQ=="}],"size":8647},"_npmUser":{"name":"anonymous","email":"linkirk@163.com","actor":{"name":"kirklin","email":"linkirk@163.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.1.0_1751705365226_0.1348354215709131"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-05T08:49:25.392Z","publish_time":1751705365392,"_source_registry_name":"default","hasInstallScript":true,"contributors":[]},"0.1.1":{"name":"@kirklin/logger","type":"module","version":"0.1.1","description":"A modern, flexible, and elegant logger for Node.js and the browser.","author":{"name":"Kirk Lin","email":"https://github.com/kirklin"},"license":"MIT","funding":"https://www.buymeacoffee.com/linkirk","homepage":"https://github.com/kirklin/logger#readme","repository":{"type":"git","url":"git+https://github.com/kirklin/logger.git"},"bugs":{"url":"https://github.com/kirklin/logger/issues"},"keywords":[],"sideEffects":false,"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","devDependencies":{"@antfu/ni":"^25.0.0","@kirklin/eslint-config":"^5.0.0","@types/node":"^24.0.6","bumpp":"^10.2.0","eslint":"^9.30.0","esno":"^4.8.0","lint-staged":"^16.1.2","pnpm":"^10.12.4","rimraf":"^6.0.1","simple-git-hooks":"^2.13.0","taze":"^19.1.0","typescript":"^5.8.3","unbuild":"^3.5.0","vite":"^7.0.0","vitest":"^3.2.4"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","lint:fix":"eslint . --fix","release":"bumpp","start":"esno src/index.ts","play":"vite playground","test":"vitest","typecheck":"tsc --noEmit","up":"taze latest -r -w -I"},"_id":"@kirklin/logger@0.1.1","_integrity":"sha512-+nDo2zlnygM0VdpomzdyuZYuwrS69WF2y/wJtykizQc/PTxjNTKntnn/KFrrIvoxAXK0t4bRtyx7MWVD5Tio0Q==","_resolved":"/private/var/folders/qs/16__nw6n7wn3v6cprtzvg4qc0000gn/T/f7bfe30967f13c9fcd2f4460cddf7545/kirklin-logger-0.1.1.tgz","_from":"file:kirklin-logger-0.1.1.tgz","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-+nDo2zlnygM0VdpomzdyuZYuwrS69WF2y/wJtykizQc/PTxjNTKntnn/KFrrIvoxAXK0t4bRtyx7MWVD5Tio0Q==","shasum":"d1bef35745956817fac5104433495fe9b849b5ba","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@kirklin/logger/-/logger-0.1.1.tgz","fileCount":6,"unpackedSize":34102,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICm6BCHaDlX/4OFE+s+7vY5SAIxnKNrw3FHGxwN4TndDAiA7VwlKYc7LhCY9a4qp965rrVRNjRM5wSDTQz86rHne+Q=="}],"size":8641},"_npmUser":{"name":"anonymous","email":"linkirk@163.com","actor":{"name":"kirklin","email":"linkirk@163.com","type":"user"}},"directories":{},"maintainers":[{"name":"anonymous","email":"linkirk@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.1.1_1751766345777_0.3319551814682158"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-06T01:45:45.965Z","publish_time":1751766345965,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.1.1"},"name":"@kirklin/logger","time":{"created":"2023-01-30T09:04:30.863Z","0.0.1":"2023-01-30T08:46:28.497Z","modified":"2025-07-06T02:16:03.915Z","0.0.2":"2023-03-08T13:55:41.785Z","0.0.3":"2025-07-05T03:34:06.780Z","0.0.5":"2025-07-05T04:37:38.652Z","0.1.0":"2025-07-05T08:49:25.392Z","0.1.1":"2025-07-06T01:45:45.965Z"},"readme":"# @kirklin/logger\n\n[![npm version](https://img.shields.io/npm/v/@kirklin/logger.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/@kirklin/logger)\n[![npm downloads](https://img.shields.io/npm/dm/@kirklin/logger.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/@kirklin/logger)\n[![license](https://img.shields.io/npm/l/@kirklin/logger.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://github.com/kirklin/logger/blob/main/LICENSE)\n\nA modern, flexible, and elegant logger for Node.js and the browser.\n\n- **Elegant & Intuitive API**: Works just like `console.log` but with levels and superpowers.\n- **Structured & Raw Logging**: Supports both structured `field()` logging for clarity and raw object logging for quick debugging.\n- **Node.js & Browser Support**: First-class, optimized experience in both environments.\n- **Smart Browser Grouping**: Intelligently groups logs in the browser to reduce clutter without hiding important information.\n- **Named Loggers**: Create sub-loggers with automatic, deterministic coloring to easily distinguish log sources.\n- **Performance Timers**: Simple `time()` utility to measure and log execution times.\n- **Extensible**: Easily create custom `Transports` and `Formatters` to fit your needs.\n- **Lightweight & Typed**: Written in TypeScript with zero dependencies.\n\n## Install\n\n```bash\n# pnpm\npnpm add @kirklin/logger\n\n# yarn\nyarn add @kirklin/logger\n\n# npm\nnpm install @kirklin/logger\n```\n\n## Getting Started\n\n```typescript\nimport { field, logger, time } from \"@kirklin/logger\";\n\n// --- Basic Logging ---\nlogger.info(\"Hello from the playground! This is a standard info message.\");\nlogger.warn(\"This is a warning message.\");\nlogger.error(\"This is an error message.\");\nlogger.debug(\"This is a debug message (won't show by default).\");\nlogger.trace(\"This is a trace message (won't show by default).\");\n\nconsole.log(\"\\n\"); // Spacer\n\n// --- Flexible Object & Argument Logging ---\nlogger.info(\"Logging a single object:\", { id: 1, name: \"Kirk Lin\", status: \"active\" });\nlogger.info(\"Logging multiple objects:\", { user: \"kirk\" }, { permissions: [\"read\", \"write\"] });\nconst myVar = { a: 1, b: [2, 3] };\nlogger.info(\"Logging a variable:\", myVar);\nlogger.error(\"An error occurred\", new Error(\"Something went wrong!\"));\n\nconsole.log(\"\\n\"); // Spacer\n\n// --- Structured Logging with `field()` ---\nlogger.info(\"User logged in successfully\", field(\"userId\", 12345), field(\"tenant\", \"acme-corp\"));\n\n// --- Mixed Logging (message, fields, and raw objects) ---\nlogger.warn(\n  \"Request to deprecated endpoint\",\n  field(\"endpoint\", \"/api/v1/legacy\"),\n  { userAgent: \"Mozilla/5.0\" },\n);\n\nconsole.log(\"\\n\"); // Spacer\n\n// --- Named Loggers ---\nconst dbLogger = logger.named(\"database\");\nconst apiLogger = logger.named(\"api\");\ndbLogger.info(\"Connecting to the database...\");\napiLogger.info(\"Incoming request to /users\");\n\nconsole.log(\"\\n\"); // Spacer\n\n// --- Timers ---\nconst timer = time(200);\nsetTimeout(() => {\n  dbLogger.info(\"Database connected successfully\", field(\"time\", timer));\n}, 150);\n\nconst failingTimer = time(100);\nsetTimeout(() => {\n  apiLogger.error(\"Request timed out\", field(\"time\", failingTimer));\n}, 200);\n\n// --- Lazy Evaluation ---\nlogger.debug(() => {\n  // This expensive operation will only be performed if the log level is debug or lower\n  const complexData = { a: 1, b: Array.from({ length: 1e6 }, (_, i) => i).reduce((a, b) => a + b, 0) };\n  return [\"This is a debug message with complex data\", field(\"data\", complexData)];\n});\n\n// --- Throttling ---\nlogger.info(\"\\n--- Testing Throttling (you should only see a few messages below) ---\");\nfor (let i = 0; i < 100; i++) {\n  logger.info(\"This is a spam message\");\n}\n```\n\n## Features\n\n### Logging Arguments\n\nYou can pass any number of arguments of any type, just like `console.log`.\n\n```typescript\nlogger.info(\"Simple string message\");\nlogger.error(\"An error occurred\", new Error(\"File not found\"));\nlogger.warn(\"Request to deprecated endpoint\", {\n  url: \"/api/v1/legacy\",\n  statusCode: 410,\n});\n```\n\n### Named Loggers\n\nCreate context-specific loggers that are automatically colored and tagged.\n\n```typescript\nconst dbLogger = logger.named(\"database\");\nconst apiLogger = logger.named(\"api\");\n\ndbLogger.info(\"Connecting to PostgreSQL...\");\n// [database] [info] Connecting to PostgreSQL...\n\napiLogger.info(\"GET /users request received\");\n// [api] [info] GET /users request received\n```\n\n### Timers\n\nEasily measure the duration of operations.\n\n```typescript\nimport { field, logger, time } from \"@kirklin/logger\";\n\nconst timer = time(100); // Optional: expected duration in ms for color coding\n\nsetTimeout(() => {\n  // This will be colored green because it finished within the expected time\n  logger.info(\"Data fetched\", field(\"time\", timer));\n}, 80);\n\nconst slowTimer = time(50);\nsetTimeout(() => {\n  // This will be colored red because it exceeded the expected time\n  logger.warn(\"Task finished late\", field(\"time\", slowTimer));\n}, 120);\n```\n\n### Lazy Evaluation\n\nFor performance-critical logs, you can pass a function. The function will only be executed if the corresponding log level is enabled, avoiding unnecessary computations.\n\n```typescript\nlogger.debug(() => {\n  const expensiveData = someComplexCalculation();\n  return [\"Debug data calculated\", field(\"data\", expensiveData)];\n});\n```\n\n## Extensibility\n\nYou can easily extend the logger by creating your own `Transport` or `Formatter`.\n\n### Custom Transport\n\nA transport is responsible for sending the log to a destination (e.g., console, file, remote service).\n\n```typescript\nimport type { LogObject, Transport } from \"@kirklin/logger\";\n\nclass MyFileTransport implements Transport {\n  log(logObject: LogObject) {\n    const formattedMessage = myCustomFormatter.format(logObject);\n    // Logic to write `formattedMessage` to a file...\n  }\n}\n\n// Then add it to the logger instance\nlogger.transports.push(new MyFileTransport());\n```\n\n### Custom Formatter\n\nA formatter is responsible for converting a `LogObject` into a string or another printable format.\n\n```typescript\nimport type { LogObject, MessageFormat } from \"@kirklin/logger\";\nimport { Formatter } from \"@kirklin/logger\";\n\nclass MyJSONFormatter extends Formatter {\n  format(logObject: LogObject): MessageFormat {\n    // In a real implementation, you would return a format string and args.\n    // For simplicity, we just stringify the object here.\n    const jsonString = JSON.stringify({\n      timestamp: logObject.date,\n      level: logObject.level,\n      message: logObject.message,\n      ...logObject.args,\n    });\n    return { format: \"%s\", args: [jsonString], fields: [] };\n  }\n}\n```\n\n## License\n\n[MIT](./LICENSE) License &copy; 2022-PRESENT [Kirk Lin](https://github.com/kirklin)","users":{}}