{"_id":"@blastz/nico-logger","_rev":"4-f6d3e2d1f0e4c201c0968b42d49ca3e5","name":"@blastz/nico-logger","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@blastz/nico-logger","version":"0.1.0","description":"nodejs logger","main":"dist/index.js","scripts":{"tsc":"tsc","test":"jest","publish":"npm run tsc && npm test && npm publish --access public --registry=https://registry.npmjs.org"},"author":{"name":"blastz"},"license":"MIT","dependencies":{"@types/node":"^15.0.3","chalk":"^4.1.1","winston":"^3.3.3","winston-daily-rotate-file":"^4.5.5"},"devDependencies":{"@types/jest":"^26.0.23","jest":"^26.6.3","typescript":"^4.2.4"},"gitHead":"4a78fd9c366f77217452fa259312d2233b86afa1","_id":"@blastz/nico-logger@0.1.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-P5vKB0QkJvD2gwTgxYUrQCZdmapqgJzL703nv5MDqq0N5OsaDn/7n8PM052dO97A6TCTFQ+tKrEbfZAbbb4bcg==","shasum":"9c9bb88d3d169520d27d21caf14856ba36a2842f","tarball":"https://registry.npmjs.org/@blastz/nico-logger/-/nico-logger-0.1.0.tgz","fileCount":21,"unpackedSize":37601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgniTMCRA9TVsSAnZWagAADlkP/3M2SPtT0i1EbluzXYtW\n+g92ZQK6FmKWHu2RpfgSYnQJhA6gKYUU+quK0i4CPxoh3EpdFkYsnjQylLVX\nNZ6+7TRrPbiZ9/ZlwHoLdWbPNdYxhXCcwY/tBdOw+0XOiNlO/76qjColHged\n097GE7ubYtCNbwXzHdtq+2YeLb9FP/IB9IkxNM6OztUoUaukjs9TzerPTiMl\nptGqMz6K1tf+cUMgdq+wD7Ih549JL6uhBjo7EpFCzG9n5xM3tkng0AIBtNuD\nK2SyQBkVxExJZdXxT3fV59CQm/RovzrjXHf4/P9MEzKWJGHRd1G0q24q5Mkc\n2MyWfQbXCWRMP7Z8VuiJocDAT/3lr/TmHE4ITC/OEdVNUD65l0XXGzLpC+RQ\nEKytKDGqrmlaQMeC10EBjcamDTm0pjay0XUr4+cjL7tZuG5t4B2wiWG+BuVy\nPdx/UZVAZfnRd46GmdmLBY18BCZh18b0C1BvXUPp6epS0yut9tAjZfcVFqYg\nuLqgvx1ONo2hp4G2kwRPgo0wbcJp+xNqVWGEVurhNaa4R1r8FxJ4kpt0RoIa\nVgwCJ3IPwmtD+vOOLziLYV4iHtP9nfIWy0+leogYkuTUMwFLUxMjPyRWFl2W\nerL5KiR25mMxEm2gW+skr3/jbaBdK+rL+/tnMd1aB6Jgjb1LAn10DJ+4WDHd\nveVp\r\n=YoKH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6R+CwgkNK8WD6hh6Y7M+o0I0qKPhBjMCc1FLUkXNxpQIgBDjaYk+ZcUghkumdR7giXmTTc43jMy2fzHtFlW4eALg="}]},"_npmUser":{"name":"blastz","email":"touchzh1996@outlook.com"},"directories":{},"maintainers":[{"name":"blastz","email":"touchzh1996@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nico-logger_0.1.0_1620976844451_0.3511199971058083"},"_hasShrinkwrap":false},"0.2.0":{"name":"@blastz/nico-logger","version":"0.2.0","description":"nodejs logger","main":"dist/index.js","scripts":{"tsc":"tsc","test":"jest","push":"npm run tsc && npm test && npm publish --access public --registry=https://registry.npmjs.org"},"author":{"name":"blastz"},"license":"MIT","dependencies":{"@types/node":"^15.6.0","chalk":"^4.1.1","winston":"^3.3.3","winston-daily-rotate-file":"^4.5.5"},"devDependencies":{"@types/jest":"^26.0.23","jest":"^26.6.3","typescript":"^4.2.4"},"gitHead":"e591dea0a3ec3b36b761ccee02faa9b208ba812a","_id":"@blastz/nico-logger@0.2.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QE46PHFzCrXUK2YIL2mD5LnFMhQHgKtNn1S/rXKx6o6jvOIBQZoTxxYE1mU4oGPb27+eKmuPZ7nDkpEXHtpdpg==","shasum":"b70e0c07500b729ff3315c358d291c994c7b9f46","tarball":"https://registry.npmjs.org/@blastz/nico-logger/-/nico-logger-0.2.0.tgz","fileCount":21,"unpackedSize":38737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqxnmCRA9TVsSAnZWagAAzhYQAJycG4fKcBjRp5/8+uUK\no61x9ezZAgCXRWBWwvJXDWAo6FZmyC1bfiFP1xJHvKNSddMWpRF0J/Ygc2lC\n6ABaxBouGllbTPHlnkP8+CbCG3ljQ2y2X6QfuDMrLywRd/PGAJc04NCzVHJH\no8bRuG4hA4Sw2/IzXIEJIjLG/GATPc1xZzj14cCp2EdwB3itxC4f8RtZwVPo\nPBMLR21XxpYlP2cwYH/BQPIuo7b3dAQGVDvDhADzkvm8NWG4UPXV9tW3Eyrb\nxFZHWmGAAAZgCObqx2qn11w1UGcb8fNOpMJ4P6XxLr3pYQn21lT/3JS1cmf6\n9s89GqJA+CliPyWcXH2dajOG4cCrzTOS5qbCPzsELYZ4s/S0j8WwarQDX7nX\nbFgU4ofaNHZvYsFmXzJyOHpl0csaA/9fG8PIb6W61/4dZUXoHcDsZgYCdRVr\nZkFm9AgIbdxxYk5+p2r4NEg4P0xPmr57ImSlytqgYpUK/w8q0NAVxOLiXSOI\nv/eIRUPiKa7+t12AzogDUV4qlqLykjkPO3gssJqzL752FFHAFM/La841KXXO\n1PZaVMkMqW39sjjSkXe4Yn9JgK7s4Ha2gOyBPBUiFV1vPfUUX/cliOn4wXJa\nI8p8QtsaKA9/uECFOodd52TuSNYzZrUVh/EIk83CFLz5oLsu2xgEW2DlKLxH\nDQyP\r\n=hvL7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyftORd2raIv4fRZxghegJQJsm1wbYxOw2POfnMaqB2gIgdg3EkHzG041B593UgRnGrFmiwY3JAjR7hojHtnL3ovM="}]},"_npmUser":{"name":"blastz","email":"touchzh1996@outlook.com"},"directories":{},"maintainers":[{"name":"blastz","email":"touchzh1996@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nico-logger_0.2.0_1621826022181_0.25579227618663114"},"_hasShrinkwrap":false},"0.2.1":{"name":"@blastz/nico-logger","version":"0.2.1","description":"nodejs logger","main":"dist/index.js","scripts":{"tsc":"tsc","test":"jest","push":"npm run tsc && npm test && npm publish --access public --registry=https://registry.npmjs.org"},"author":{"name":"blastz"},"license":"MIT","dependencies":{"@types/node":"^15.6.0","chalk":"^4.1.1","winston":"^3.3.3","winston-daily-rotate-file":"^4.5.5"},"devDependencies":{"@types/jest":"^26.0.23","jest":"^26.6.3","typescript":"^4.2.4"},"gitHead":"4c6c75c2203b2cf845089061da8ce45d8d554320","_id":"@blastz/nico-logger@0.2.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-TPStNhPRQrFYPCDZtwzplqE21Zi8nDTzyUZDnf1303eC4Eidp1D9zCxU4pk++eK9EoJo7GUrYSPgh4HBKKOECg==","shasum":"491caed6eca92d2cc73ba275fdaf0cabccb90983","tarball":"https://registry.npmjs.org/@blastz/nico-logger/-/nico-logger-0.2.1.tgz","fileCount":21,"unpackedSize":38815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqx8wCRA9TVsSAnZWagAA114QAIlfmKxiQ+v+AIvwIjoU\nGz9KudfXoiAW3hOb2wE9thj2/dnJnd2HDG3La+/DdUj7SWw8I1+5J9JWt6iH\nJVSAmrLlAcL8Z7KAbBDpHPkVz/W2T2kWfW+/HFDzei9YfX1FW5kt121iIwE9\nau5Mup9yHG+YlrHVplcbkAEBCYrlbal9Gy4+V94hfmO3E2YhcKJouDSX4urH\nn2wZk9VZTnW7NtPOCIApfxc9ia9V0QJ0nUSFTULR5U0qlm0xIu5BQIfijOOH\nf7AqnqJ2buq8V8rYUV2ctTZL89t2uK+Iy0qs9tjnzQRdpMGlg5T932Qstx+X\nldGMFagCDScpzupeHPLwAfWSw2eaSb2LF/UVU1Q27zbcihHVwUefXCA0nmtu\nNZeNeOB5tFN/wkuQphOBmPNvUlWELIqV5Sa9N7pJrAR+jwr4txN4BxjQZVsr\nhAsaEteQq5TcSzj6Co+UmChGzHS0wtn6gcg1NdnBRnk2bxrAJv4eDquhuFnR\n/QlBhZZy/OSB6aAdRJQGC7K1tfgqZ6F1a7NE0YfRjUwogpTBv2O23NDu8wFX\nEKw8YeZXv48t4pWd+gezngGNJYLxj9rIitnDrn7iX2PVXUnk7EGpCsI7e2GU\nbEYNo4gwRIy6Z25OkJg9XzeNnKZKdISZkCQvj+XupE/vVLtP5hcQj8aYCD/D\nq+qr\r\n=mOwZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+oi31Bidrg2zQ9qoJxjndg729U+qVBT7jraIG1FtdeAiAdI75gqmAg8PJ5kxt2piSL0lmUx2FrWJX5739aDAk32g=="}]},"_npmUser":{"name":"blastz","email":"touchzh1996@outlook.com"},"directories":{},"maintainers":[{"name":"blastz","email":"touchzh1996@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nico-logger_0.2.1_1621827375956_0.1408999681093026"},"_hasShrinkwrap":false},"0.3.0":{"name":"@blastz/nico-logger","version":"0.3.0","description":"nodejs logger","main":"dist/index.js","scripts":{"tsc":"tsc","test":"jest","push":"npm run tsc && npm test && npm publish --access public --registry=https://registry.npmjs.org"},"author":{"name":"blastz"},"license":"MIT","dependencies":{"@types/node":"^15.6.0","chalk":"^4.1.1","winston":"^3.3.3","winston-daily-rotate-file":"^4.5.5"},"devDependencies":{"@types/jest":"^26.0.23","jest":"^26.6.3","typescript":"^4.2.4"},"gitHead":"e57b0fec92f77262cf8dafe1d1651051300e8665","_id":"@blastz/nico-logger@0.3.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-bIXSaqyqDpEkaYyOVuERqv1bwqa7rGEcQDHRFhAMO7RhbpU9a930O5qMEx1uS3h2myjkwRISw8Fq0dy1THG4rQ==","shasum":"98670b4c11ffb926b53c93dde6355c4031ba40eb","tarball":"https://registry.npmjs.org/@blastz/nico-logger/-/nico-logger-0.3.0.tgz","fileCount":21,"unpackedSize":39929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqyPWCRA9TVsSAnZWagAAOXwP/3MMJjZcUWsQ0zpCkqPd\nWxR0Xwe0r9bI98EK8zxN/4CLq85a1CQUMODK88bbexGDcgXpfOAcawYriwBZ\nQsgzPTXMs/NquiKAT5I8IVp8GtiovQlFbMYBPnHZ64UcPiQISbaRbXWgGDeC\nueEI4WeXaZxIV+3ZtYVd+DtOaRvv1GWZSokRBNtmQnIe0H2e/e+wzV3h2YWe\nle/SVs9u9kOYZFNbmdeD2+GQbWsfX+njv9PUwudMfbZZQ3i6eBKup7h7WUyM\nGblo56+tcPa7NamiInI1sls9DFlozQ1XZba8wYvi4TJx/RXXpDZrrxCJM5cc\n5FLncY9bVcfQxhqh1uTI7GSwAVBqFvUNoURdd/afM46V3dZvm9M2lTVYuzwN\nhF+jBqqpI/1joMZIaZ/fE/uf/O/USqZVcLfT1WU70V02VKqYnu6R5t3r7327\nRhGZ5MRyhFVzE9OLtnSsDKYOvyH8aK2VXNI8Gyyt7JFcb+PKRhV0nFq2o9IM\n9ORSKwMMCWyiZtAagP7HTnpHGwTfZ/ZRB4LuRkMPXQ1AO/8TORFtS6M79VF4\nN9KExPPS2FdykhC33g/XNr4c8YS+wCQakErLYH2967rCPt4i6tvd3vCGzC5x\ngAMea+dmj4Vrit5G9RbQrO4gQ/9g8NzBLb4Lna3m6hQuDJEIFQ6DiZAgfkfv\nK5af\r\n=Wwr6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZsZ18oHaNY7vbD3cFnmXwKpviCOF9clk/uP9V2yFLRAiAzG0dKnSkANkDra/ycD+lrrPMN6zbK9kMj8ADSqFiY6w=="}]},"_npmUser":{"name":"blastz","email":"touchzh1996@outlook.com"},"directories":{},"maintainers":[{"name":"blastz","email":"touchzh1996@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nico-logger_0.3.0_1621828566521_0.09997471230529431"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-14T07:20:44.399Z","0.1.0":"2021-05-14T07:20:44.667Z","modified":"2022-04-04T19:25:26.304Z","0.2.0":"2021-05-24T03:13:42.409Z","0.2.1":"2021-05-24T03:36:16.098Z","0.3.0":"2021-05-24T03:56:06.701Z"},"maintainers":[{"name":"blastz","email":"touchzh1996@outlook.com"}],"description":"nodejs logger","author":{"name":"blastz"},"license":"MIT","readme":"# Nico Logger\n\nNode.js logger based on [winston](https://github.com/winstonjs/winston).\n\n## Install\n\n```bash\n$ npm install @blastz/nico-logger\n```\n\n## Logging levels\n\nThe logger support six loggin levels\n\n```ts\nconst levels = {\n  fatal: 0,\n  error: 1,\n  warn: 2,\n  info: 3,\n  debug: 4,\n  trace: 5,\n};\n```\n\n## Consle transport\n\nSet `consoleLevel` to enable console transport\n\n```ts\nimport { NicoLogger, LoggerLevel } from \"@blastz/nico-logger\";\n\nconst logger = new NicoLogger({\n  consoleLevel: LoggerLevel.Debug,\n}).getLogger();\n\nlogger.debug(\"test\");\n```\n\nConsole transport will output logs with such format\n\n```bash\n2021-05-14T06:30:02.421Z  INFO\n{\n  message: 'test',\n  hostname: 'OMEN',\n  pid: 32684\n}\n```\n\n## File transport\n\nSet `fileLevel` to enable file transport\n\n```ts\nimport { NicoLogger, LoggerLevel } from \"@blastz/nico-logger\";\n\nconst logger = new NicoLogger({\n  fileLevel: LoggerLevel.Trace,\n}).getLogger();\n\nlogger.debug(\"test\");\n```\n\nFile transport will log with json format\n\n```bash\n{\"message\":\"trace\",\"level\":\"trace\",\"hostname\":\"OMEN\",\"pid\":762,\"timestamp\":\"2021-05-14T06:51:59.894Z\"}\n```\n\nSet `{ disableJsonFormat: true }` to keep raw logger output.\n\nAll options in [winston-daily-rotate-file](https://github.com/winstonjs/winston-daily-rotate-file) are supported by `fileLevel` options.\n\n### Multiple file transport\n\nSet multiple levels file logging is supported.\n\n```ts\nimport { NicoLogger, LoggerLevel } from \"@blastz/nico-logger\";\n\nconst logger = new NicoLogger({\n  fileLevel: [LoggerLevel.Trace, LoggerLevel.Error],\n}).getLogger();\n\nlogger.debug(\"test\");\n```\n\nIt will create two folds `error` and `trace`\n\n- log\n  - error\n  - trace\n\nThe error fold will only include loggin files that logging level is above `error`.\n\n## License\n\nLicensed under MIT\n","readmeFilename":"README.md"}