{"name":"@azure/logger","version":"1.0.1-dev.20200611.1","keywords":["Azure","Log","Logger","Logging","Node.js","TypeScript","JavaScript","Browser"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/logger@1.0.1-dev.20200611.1","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},{"name":"christopheranderson","email":"chrande@outlook.com"},{"name":"southpolesteve","email":"southpolesteve@gmail.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"4dfeb8f841e7aac6bfa285817cf4c58555bb1dba","tarball":"http://registry-npm.ywwl.com/@azure/logger/download/@azure/logger-1.0.1-dev.20200611.1.tgz","fileCount":15,"integrity":"sha512-Qf/1LSNHWst7Ufn543Le+JoGZg98F62zQ9RVECJ46HvC6mK+cK+fX6WpxRQ/eqWDwHKScHBsxeXv6ljIZzPU1g==","signatures":[{"sig":"MEQCIDqSUlRDQOUz44BoMFI7YcP97gcxw5Cy73h4Tij93cFrAiA0KFOuNJGunHEykozqzihbDkJ5yI4YwFDv7vlBUseoSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4qf3CRA9TVsSAnZWagAAO6wP/1HNLKqEWmca+FAIaJb6\n7U1Z0uDR2AcHYLJx2J4aTA/J69sGXWmSEvO/zkpGetq2TFALYZuriCKrlVcp\nCcz0bkw5czHg6N/F/laDfafFXLNEjDCHuseddz1l/TD+MQIGmerLljQMVm5Q\nf2UGEcx+cwJ1oNduwNgTNnsbRqkNW9rLQuRPdrBHw0qit2geVRj70T7pYsI2\nEPxka4phiaxtBIttOzTgq7XvECqxnkwKiU25vkerFeCeb5vSib7zVmRATE7Q\nMxp9v53ayKIsHRpkpg2LB1bZU15DmZaED0NjjPLV7wryhwNzvWISHv9DEiiW\noyPMgNqbgp4iaZ1y3mt/0luzA8t7g4CLIyFSzfHY9NfH6uWC9s8VgN083C2+\no/QnuZ51NpxACIUCO43w8GHG5h4CDTyjGXnDMVCdHj3rleQZblvOZhRHA5iV\nWyKHp7LcMiOPKiuLoQEHq/oz2mIxk7HA93LBD48xS3z4MFAD31s+Ik8gKXNL\nGnTyuD0zP5C4Xzkl23UVdg+figcvxYMWl5F+L4JI8IpnN2QhkZJKrpNXc3hR\nMQNybUC+uCxnsads+guEgzuuZXwK0Lod4YERG5HT/7ONDWiac3x07Kmif0JN\nlw7AlexYY6HLz/oGnWRAGUkrKfS3cdGcLpc5gxFquapBsurv3lTlFdpwm0p8\nRXsf\r\n=VSW7\r\n-----END PGP SIGNATURE-----\r\n","size":11480,"noattachment":false,"key":"/@azure/logger/-/@azure/logger-1.0.1-dev.20200611.1.tgz"},"main":"./dist/index.js","_from":"file:/home/vsts/work/1/packages/azure-logger-1.0.1-dev.20200611.1.tgz","types":"./types/logger.d.ts","engine":{"node":">=8.0.0"},"module":"./dist-esm/src/logger.js","readme":"# Azure Logger library for JavaScript\n\nThe `@azure/logger` package can be used to enable logging in the Azure SDKs for JavaScript.\n\nLogging can be enabled for the Azure SDK in the following ways:\n\n- Setting the AZURE_LOG_LEVEL environment variable\n- Calling setLogLevel imported from \"@azure/logger\"\n- Calling enable() on specific loggers\n- Using the `DEBUG` environment variable.\n\nNote that AZURE_LOG_LEVEL, if set, takes precedence over DEBUG. Only use DEBUG without specifying AZURE_LOG_LEVEL or calling setLogLevel.\n\n## Getting started\n\n### Installation\n\nInstall this library using npm as follows\n\n```\nnpm install @azure/logger\n```\n\n## Key Concepts\n\nThe `@azure/logger` package supports the following log levels\nspecified in order of most verbose to least verbose:\n\n- verbose\n- info\n- warning\n- error\n\nWhen setting a log level, either programmatically or via the `AZURE_LOG_LEVEL` environment variable,\nany logs that are written using a log level equal to or less than the one you choose\nwill be emitted.\n\nFor example, setting the log level to `warning` will cause all logs that have the log\nlevel `warning` or `error` to be emitted.\n\n## Examples\n\n### Example 1 - basic usage\n\n```js\nconst { EventHubClient } = require('@azure/event-hubs');\n\nconst logger = require('@azure/logger');\nlogger.setLogLevel('info');\n\n// operations will now emit info, warning, and error logs\nconst client = new EventHubClient(/* params */);\nclient.getPartitionIds()\n  .then(ids => { /* do work */ })\n  .catch(e => { /* do work */ });\n});\n```\n\n### Example 2 - redirect log output\n\n```js\nconst { AzureLogger, setLogLevel } = require(\"@azure/logger\");\n\nsetLogLevel(\"verbose\");\n\n// override logging to output to console.log (default location is stderr)\nAzureLogger.log = (...args) => {\n  console.log(...args);\n};\n```\n\nUsing `AzureLogger`, it is possible to redirect the logging output from the Azure SDKs by\noverriding the `AzureLogger.log` method. This may be useful if you want to redirect logs to\na location other than stderr.\n\n## Contributing\n\nIf you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.\n\n![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Flogger%2FREADME.png)\n","browser":{"process":false,"./dist-esm/src/log.js":"./dist-esm/src/log.browser.js"},"scripts":{"lint":"eslint -c ../../.eslintrc.old.json src test --ext .ts -f html -o logger-lintReport.html || exit 0","pack":"npm pack 2>&1","test":"npm run build:test && npm run unit-test && npm run integration-test","audit":"node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit","build":"npm run build:es6 && npm run build:nodebrowser && npm run extract-api","clean":"rimraf dist dist-esm dist-test types temp dist-browser/*.js* dist-browser/*.zip statistics.html coverage coverage-browser .nyc_output *.tgz *.log test*.xml TEST*.xml","format":"prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","pretest":"npm run build:test","lint:fix":"eslint \"src/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.old.json --fix --fix-type [problem,suggestion]","prebuild":"npm run clean","build:es6":"tsc -p tsconfig.json","test:node":"npm run build:test && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"rollup -c rollup.test.config.js 2>&1","extract-api":"tsc -p . && api-extractor run --local","check-format":"prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","test:browser":"npm run build:test && npm run unit-test:browser && npm run integration-test:browser","unit-test:node":"cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" mocha --require ts-node/register --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace --no-timeouts test/*.spec.ts","execute:samples":"echo skipped","integration-test":"npm run integration-test:node && npm run integration-test:browser","build:nodebrowser":"rollup -c 2>&1","unit-test:browser":"karma start --single-run","integration-test:node":"echo skipped","integration-test:browser":"echo skipped"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"sdk-type":"client","_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.14.5","description":"Microsoft Azure SDK for JavaScript - Logger","directories":{},"sideEffects":false,"_nodeVersion":"12.18.0","dependencies":{"tslib":"^2.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.0.0","chai":"^4.2.0","delay":"^4.2.0","karma":"^4.0.1","mocha":"^7.1.1","sinon":"^9.0.2","assert":"^1.4.1","dotenv":"^8.2.0","eslint":"^6.1.0","rimraf":"^3.0.0","rollup":"^1.16.3","ts-node":"^8.3.0","prettier":"^1.16.4","cross-env":"^7.0.2","puppeteer":"^3.3.0","typescript":"~3.9.3","@types/chai":"^4.1.6","@types/node":"^8.0.0","karma-mocha":"^1.3.0","@types/mocha":"^7.0.2","@types/sinon":"^9.0.4","karma-coverage":"^2.0.0","karma-ie-launcher":"^1.0.0","karma-edge-launcher":"^0.4.2","karma-junit-reporter":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-remap-istanbul":"^0.6.0","mocha-junit-reporter":"^1.18.0","rollup-plugin-terser":"^5.1.1","eslint-plugin-no-null":"^1.0.2","eslint-plugin-promise":"^4.1.1","karma-chrome-launcher":"^3.0.0","@rollup/plugin-replace":"^2.2.0","eslint-config-prettier":"^6.0.0","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.1.0","@rollup/plugin-commonjs":"11.0.2","@microsoft/api-extractor":"7.7.11","rollup-plugin-sourcemaps":"^0.4.2","@typescript-eslint/parser":"^2.0.0","@rollup/plugin-multi-entry":"^3.0.0","@rollup/plugin-node-resolve":"^8.0.0","eslint-plugin-no-only-tests":"^2.3.0","@typescript-eslint/eslint-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.1-dev.20200611.1_1591912438823_0.4519555597849656","host":"s3://npm-registry-packages"},"publish_time":1591912438962,"_cnpm_publish_time":1591912438962,"dist-tags":{"dev":"1.3.1-alpha.20260306.4","latest":"1.4.0"}}