{"_rev":"2-284dec5dfc9b0a7a1710a8bb0342913c","time":{"created":"2023-10-04T16:55:44.455Z","4.1.0":"2023-10-03T20:50:10.371Z","modified":"2023-10-04T16:55:44.986Z","4.1.1":"2023-10-04T16:55:44.756Z"},"_id":"@dfcamposs/simple-json-logger-test","name":"@dfcamposs/simple-json-logger-test","dist-tags":{"latest":"4.1.1"},"versions":{"4.1.1":{"name":"@dfcamposs/simple-json-logger-test","version":"4.1.1","main":"dist/src/index.js","types":"dist/src/index.d.ts","scripts":{"prepare":"tsc","lint":"eslint . --ext ts","pretest":"npm run lint","test":"jest","test:watch":"jest --watchAll"},"keywords":["simple json logger","logger","typescript logger","typescript"],"author":{"name":"Vizir Software Studio","email":"contato@vizir.com.br"},"license":"MIT","devDependencies":{"@types/faker":"^5.5.8","@types/jest":"^27.0.1","@types/json-stringify-safe":"^5.0.0","@types/lossless-json":"^1.0.1","@types/node":"^16.9.2","@typescript-eslint/eslint-plugin":"^4.31.1","@typescript-eslint/parser":"^4.31.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^24.4.2","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-sonarjs":"^0.10.0","faker":"^5.5.3","husky":"^7.0.2","jest":"^27.2.0","prettier":"^2.4.1","pretty-quick":"^3.1.1","ts-jest":"^27.0.5","typescript":"^4.4.3"},"dependencies":{"callsites":"^3.1.0","json-stringify-safe":"^5.0.1","lossless-json":"^1.0.5","serialize-error":"^8.1.0"},"description":"The simplest json logger. Include typescript definitions.","repository":{"type":"git","url":"git+https://github.com/vizir/simple-json-logger.git"},"bugs":{"url":"https://github.com/vizir/simple-json-logger/issues"},"homepage":"https://github.com/vizir/simple-json-logger#readme","publishConfig":{"access":"public"},"gitHead":"78fbb135e523fd210981818e6c57526dffc869f7","_id":"@dfcamposs/simple-json-logger-test@4.1.1","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","_npmUser":{"name":"dfcamposs","email":"fernandesc.david@gmail.com"},"dist":{"integrity":"sha512-1jAselp+wsjTRuJDyN2oVTT5sb5dR1V2AMEJ1ZMf4yIvZ7HWQKa8jqUTtAu0izZ4i0GvA0yIj4jBeqgLUfT4FA==","shasum":"d2fbce7bb23509d831e13f2f486b9b7c5b3f5500","tarball":"https://registry.npmjs.org/@dfcamposs/simple-json-logger-test/-/simple-json-logger-test-4.1.1.tgz","fileCount":15,"unpackedSize":17022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMMFIfk7bqE0mcUAWq3zmwx6VSVyqtVKWelVKq7ebHcgIhAK5x40uIx4zlHBqfSYXSHdipxuAbyq7B7wczBzo9SATg"}]},"directories":{},"maintainers":[{"name":"dfcamposs","email":"fernandesc.david@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simple-json-logger-test_4.1.1_1696438544542_0.49116210280515715"},"_hasShrinkwrap":false}},"maintainers":[{"name":"dfcamposs","email":"fernandesc.david@gmail.com"}],"description":"The simplest json logger. Include typescript definitions.","homepage":"https://github.com/vizir/simple-json-logger#readme","keywords":["simple json logger","logger","typescript logger","typescript"],"repository":{"type":"git","url":"git+https://github.com/vizir/simple-json-logger.git"},"author":{"name":"Vizir Software Studio","email":"contato@vizir.com.br"},"bugs":{"url":"https://github.com/vizir/simple-json-logger/issues"},"license":"MIT","readme":"# @vizir/simple-json-logger\n\nA fast, simple and opinionated json logger to stdout.\n\n[![npm version](https://badge.fury.io/js/%40vizir%2Fsimple-json-logger.svg)](https://badge.fury.io/js/%40vizir%2Fsimple-json-logger)\n![Node.js CI](https://github.com/Vizir/simple-json-logger/workflows/Node.js%20CI/badge.svg?branch=master)\n\n## Motivation\n\nThis library is designed to be an easy and fast way to log json messages to `stdout`.\n\nIf you want a more advanced solution, we recommend to you use [winston](https://www.npmjs.com/package/winston).\n\n## Installation\n\n```sh\n$ npm install @vizir/simple-json-logger\n```\n\n## Usage\n\n### NodeJS Sample with Javascript\n\n```javascript\nconst { Logger } = require(\"@vizir/simple-json-logger\");\n\nconst logger = new Logger({\n  app: \"ConsoleApplication\",\n  requestId: \"3a7d3223-e96f-47da-b3bb-73f609b9f55d\",\n});\nlogger.debug(\"debug message\", { extraInfo: 123 });\nlogger.info(\"info message\", { extraInfo: \"abc\" });\nlogger.warn(\"warn message\", { moreInfo: \"abc123\" });\nlogger.error(\"error message\", { otherInfo: \"qwerty\" });\n```\n\n### Security Filtering\n\nBy default, the logger will filter some sensitive values from logs output. They will verify if an object key, contain\nsome of the following words: (The validation is case insensitive)\n\n- Authorization\n- Password\n- Secret\n- Token\n- Key\n\nYou can add or remove the default blacklist, using the _includeBlackList_ or _excludeBlackList_ attribute into options, as following:\n\n```javascript\nconst logger = new Logger(\n  {\n    app: \"ConsoleApplication\",\n    requestId: \"3a7d3223-e96f-47da-b3bb-73f609b9f55d\",\n  },\n  {\n    includeBlackList: [\"myPasswordField\"],\n    excludeBlackList: [\"accessToken\"],\n  }\n);\nlogger.error(\"error message\", { myPasswordField: \"qwerty\" });\n```\n\nThe output of the following command are:\n\n```json\n{\n  \"app\": \"ConsoleApplication\",\n  \"requestId\": \"3a7d3223-e96f-47da-b3bb-73f609b9f55d\",\n  \"level\": \"error\",\n  \"datetime\": \"2020-05-20T00:20:10.432Z\",\n  \"message\": \"origin: error message\",\n  \"myPasswordField\": \"*sensitive*\"\n}\n```\n\n## Support\n\nTested in Node.js 10-12.\n\n## License\n\n[The MIT License (MIT)](./LICENSE)\n","readmeFilename":"README.md"}