{"name":"@azure/logger","version":"1.0.1-dev.20191212.1","keywords":["Azure","Log","Logger","Logging","Node.js","TypeScript","JavaScript","Browser"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/logger@1.0.1-dev.20191212.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":"29937fd54fcfb12d1168e29878115195a0c7043f","tarball":"http://registry-npm.ywwl.com/@azure/logger/download/@azure/logger-1.0.1-dev.20191212.1.tgz","fileCount":20,"integrity":"sha512-+dVejH1W5eZ5M7dt2+DHmu1zu9HsVsuT5r4RPHkkuhYnzr+FtmDzGo7/dDg7oE09Us9Pw6Lr1lFNTiPKrh58sw==","signatures":[{"sig":"MEUCIQChw8wR2A/c3q3t4anC8u94VpzSy2ymG/+Ijdy2vvM6dgIgEKr+9IEkW+Ucm8FSj5LfKeF7yorA9p51es2X9fr5Kfs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8kbjCRA9TVsSAnZWagAAC1wQAJE/DtjIJPZXNCRj1vuQ\ntNzUFhDO3BJLyFbSKy45dyucUGhk0Rsick7JL9OD/KJrNZEFgsEw9/sBGtJg\nLEB88HtrUxD3F1172l9W0ZEcmGu+KbnzZYCtZqorvScl7NUGuNq0O8kG0SCQ\nabdw6Ks+bAfM1zp0Iy+yNTylKPlBuv+b3pH8EW9fFyrjX4s5crW0CIMdFpSq\nm4XrCbOHY5KxiVvY9EwjTtO5SP1QL6rD5uACMMtrXZjc+J5aUlHLGWU/sJQB\n1+8hsr3oEGwT0mOA1Uo/rhbWQYksNIWDg94VpS1mjEFjVxjvuZog7vNOW8gn\nsuv/auyW9Vw1/sPDRTpOsxwjrcLmFRRXpsLs2kKkr/6lnU1GID87WuQqaXvp\neIKYeRMAPeRV1062ljRrb60zQ7/I/KLQn2JUBudb9RL9xnhvRU7s4IoATD+t\nLr5A1hQArdRGcfn96bFec8633cK1xybWsXjf+i5slNwSK0YOa9n3CdWcFAdu\nyXzSHJLO/iVkgFUFzdG6lCL67fkQtGlsSiH3bqtapMqFKgnWOITQmNVyA67h\nBw5cmcTl40+hDvGHCJT+TKAzbfDrYZwr9Oa90eaOdOtUQJOCqh5cEjJx0hB3\nxAEkIsaC533DSvm+z40gjZA4DMRly0AOj2mq0LX1nT842Y9po9TZI/RauZdV\nadAm\r\n=FRqf\r\n-----END PGP SIGNATURE-----\r\n","size":13602,"noattachment":false,"key":"/@azure/logger/-/@azure/logger-1.0.1-dev.20191212.1.tgz"},"main":"./dist/index.js","_from":"file:/home/vsts/work/1/packages/azure-logger-1.0.1-dev.20191212.1.tgz","types":"./types/logger.d.ts","engine":{"node":">=8.0.0"},"module":"./dist-esm/src/logger.js","readme":"# Azure Logger library for JS\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 programmitcally 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 ouput\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\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor\nLicense Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your\ncontribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and\ndecorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot.\nYou will only need to do this once across all repos using our CLA.\n\nIf you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/bd203e8b5ed5b0274b851595cb7db871b07a26f9/CONTRIBUTING.md) to learn more about how to build and test the code.\n\nThis project has adopted the Microsoft Open Source Code of Conduct.\nFor more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional\nquestions or comments.\n\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/index.js":"./browser/logger.js","./dist-esm/src/log.js":"./dist-esm/src/log.browser.js"},"scripts":{"lint":"eslint -c ../../.eslintrc.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 browser/*.js* 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.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 mocha-multi --reporter-options spec=-,mocha-junit-reporter=- --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.13.1","description":"Microsoft Azure SDK for JavaScript - Logger","directories":{},"sideEffects":false,"_nodeVersion":"12.13.1","dependencies":{"tslib":"^1.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.0.0","chai":"^4.2.0","delay":"^4.2.0","karma":"^4.0.1","mocha":"^6.2.2","sinon":"^7.1.0","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":"^6.0.3","puppeteer":"^2.0.0","typescript":"~3.6.4","@types/chai":"^4.1.6","@types/node":"^8.0.0","karma-mocha":"^1.3.0","mocha-multi":"^1.1.3","@types/mocha":"^5.2.5","@types/sinon":"^7.0.13","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-coverage":"^0.1.5","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":"^10.0.0","@microsoft/api-extractor":"^7.5.4","rollup-plugin-sourcemaps":"^0.4.2","@typescript-eslint/parser":"^2.0.0","rollup-plugin-multi-entry":"^2.1.0","rollup-plugin-node-resolve":"^5.0.2","eslint-plugin-no-only-tests":"^2.3.0","@typescript-eslint/eslint-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.1-dev.20191212.1_1576158947255_0.6765093221921972","host":"s3://npm-registry-packages"},"publish_time":1576158947433,"_cnpm_publish_time":1576158947433,"dist-tags":{"dev":"1.3.1-alpha.20260306.4","latest":"1.4.0"}}