{"name":"@azure/logger","version":"1.0.3-alpha.20210812.2","keywords":["azure","log","logger","logging","node.js","typescript","javascript","browser","cloud"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/logger@1.0.3-alpha.20210812.2","maintainers":[{"name":"southpolesteve","email":"southpolesteve@gmail.com"},{"name":"christopheranderson","email":"chrande@outlook.com"},{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"074f0c59a0affc2392e7e3d71cb46e710c4939ef","tarball":"http://registry-npm.ywwl.com/@azure/logger/download/@azure/logger-1.0.3-alpha.20210812.2.tgz","fileCount":15,"integrity":"sha512-ox89TOXTHqZRR9sXVHI/rzOxOx9Sm5abRGMsVwCD82FJ8aXRuu0bjnviyUXeKI0ZlgUgsc5Le5/WrKGO1Yp5hw==","signatures":[{"sig":"MEUCIAQC82hYzHIQbufFzZ7aphQp8inosTDQSUzi2eoClUekAiEApUCaVPhrm/UDSr5MUfauh413k7knV8HquCLjJzbMpGg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFW6zCRA9TVsSAnZWagAAbxMP/0z8uK3y+wzlQQ7/S30H\nxFxZQyKNrccmhqu7jRA45AnfFURw3npBTgnAXXXQrEzJiUieQnYMY14f5490\nI5SuV1WMk5nXDpnTzhNhYfehJiIjEEUkwaSr2ThdfteNtJj7JFEO224wpy6u\ngJ6/HRArU2TCcA5N0jFatCUdBI9na6N4nyrqWIxfa4AlhRnoTfSj1Yylqz08\nvccyVdPK+owUPNJbBZH5SynGdSKg10aNKFGVwPHjSU+o+hgfKUaEk73id8en\n2bpPkyYaORF/NXJ0Mk6xs0PCYxCxz6id2E7aJEU2RHxi9sZfY/Pz0qRW7hL9\nZLYXlsSbgw1ki4yWxNF0x8mIVSFURYwgOsiZ0+7BQCI4HchCIQidlIuH/WiD\nIEJo3bL8yloEkk/9G45QdNpQztxWPYvpg5mKkljmwvuLt+seUHMIth0NGnXX\nMMOG88q61rVkJlLB6Y8TXiSx6bv2pj32d2k6tVVrljlZ5nlQOAnz687dBjOj\nInG42miQ+MI4VO6nZRhLJP3MB9XDkwXdlw5XhVGOdyMZ4hE6cB3Wc87btIOW\nwYfdxPHTRF8SVq1cZtAxkFa0+2e1xcadiNuWNq8+QIpNa1V8xS/0WDQM6edh\nBEqLxc59611lCMxcJ4pBiMS3FvIN9yCiyL1UwKJ1X7jE8q5bzt/YACp+i06X\nJ2xY\r\n=bhyR\r\n-----END PGP SIGNATURE-----\r\n","size":10775,"noattachment":false,"key":"/@azure/logger/-/@azure/logger-1.0.3-alpha.20210812.2.tgz"},"main":"./dist/index.js","_from":"file:/mnt/vss/_work/1/packages/azure-logger/azure-logger-1.0.3-alpha.20210812.2.tgz","types":"./types/logger.d.ts","module":"dist-esm/src/index.js","readme":"# Azure Logger client 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## Next steps\n\nYou can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes.\n\n## Troubleshooting\n\nIf you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).\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/main/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"},"engines":{"node":">=12.0.0"},"scripts":{"docs":"typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src","lint":"eslint package.json api-extractor.json src test --ext .ts","pack":"npm pack 2>&1","test":"npm run clean && tsc -p . && npm run unit-test:node && rollup -c 2>&1 && npm run unit-test:browser && 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":"tsc -p . && rollup -c 2>&1 && api-extractor run --local --local","clean":"rimraf dist dist-* temp types *.tgz *.log","format":"prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"","pretest":"npm run build:test","lint:fix":"eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]","prebuild":"npm run clean","test:node":"npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"tsc -p . && rollup -c 2>&1","extract-api":"tsc -p . && api-extractor run --local","check-format":"prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","test:browser":"npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser","build:samples":"echo Obsolete","unit-test:node":"mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace  --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"","execute:samples":"echo skipped","integration-test":"npm run integration-test:node && npm run integration-test:browser","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.14","description":"Microsoft Azure SDK for JavaScript - Logger","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"tslib":"^2.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.0.0","chai":"^4.2.0","delay":"^4.2.0","karma":"^6.2.0","mocha":"^7.1.1","sinon":"^9.0.2","dotenv":"^8.2.0","eslint":"^7.15.0","rimraf":"^3.0.0","rollup":"^1.16.3","ts-node":"^9.0.0","typedoc":"0.15.2","prettier":"^1.16.4","cross-env":"^7.0.2","puppeteer":"^10.2.0","typescript":"~4.2.0","@types/chai":"^4.1.6","@types/node":"^12.0.0","karma-mocha":"^2.0.1","@types/mocha":"^7.0.2","@types/sinon":"^9.0.4","karma-coverage":"^2.0.0","@azure/dev-tool":"^1.0.0-alpha","karma-ie-launcher":"^1.0.0","karma-edge-launcher":"^0.4.2","karma-junit-reporter":"^2.0.1","karma-mocha-reporter":"^2.2.5","mocha-junit-reporter":"^1.18.0","karma-chrome-launcher":"^3.0.0","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.1.0","karma-sourcemap-loader":"^0.3.8","@microsoft/api-extractor":"7.7.11","@azure/eslint-plugin-azure-sdk":"^3.0.0-alpha"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.3-alpha.20210812.2_1628794547697_0.9339203227283537","host":"s3://npm-registry-packages"},"publish_time":1628794547832,"_cnpm_publish_time":1628794547832,"dist-tags":{"dev":"1.3.1-alpha.20260306.4","latest":"1.4.0"}}