{"name":"@azure/logger","version":"1.1.0","keywords":["azure","log","logger","logging","node.js","typescript","javascript","browser","cloud"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/logger@1.1.0","maintainers":[{"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":"1fe005a0c1065f5071c696a1f57565159cd17ebd","tarball":"http://registry-npm.ywwl.com/@azure/logger/download/@azure/logger-1.1.0.tgz","fileCount":57,"integrity":"sha512-BnfkfzVEsrgbVCtqq0RYRMePSH2lL/cgUUR5sYRF4yNN10zJZq/cODz0r89k3ykY83MqeM3twR292a3YBNgC3w==","signatures":[{"sig":"MEYCIQDLQILX3KDm2WDmEgeoY9d0ntmDk/DEwNTdmxN7nDkSBAIhANPSXMO/cwGrGTFOo6j5w0+yjk1r6m7IGLXe6G5dORgV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123618,"size":14444,"noattachment":false,"key":"/@azure/logger/-/@azure/logger-1.1.0.tgz"},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"},"dialects":["esm","commonjs"],"selfLink":false,"esmDialects":["browser","react-native"]},"type":"module","_from":"file:/mnt/vss/_work/1/packages/azure-logger/azure-logger-1.1.0.tgz","types":"./dist/commonjs/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"browser":{"types":"./dist/browser/index.d.ts","default":"./dist/browser/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"},"react-native":{"types":"./dist/react-native/index.d.ts","default":"./dist/react-native/index.js"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts","pack":"npm pack 2>&1","test":"npm run clean && tshy && npm run unit-test:node && dev-tool run build-test && npm run unit-test:browser && npm run integration-test","build":"npm run clean && tshy && api-extractor run --local","clean":"rimraf --glob dist dist-* temp *.tgz *.log","format":"dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"","pretest":"npm run build:test","lint:fix":"eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts --fix --fix-type [problem,suggestion]","test:node":"npm run clean && tshy && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"npm run clean && tshy && dev-tool run build-test","extract-api":"tshy && api-extractor run --local","check-format":"dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,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":"dev-tool run test:vitest --no-test-proxy","execute:samples":"echo skipped","integration-test":"npm run integration-test:node && npm run integration-test:browser","unit-test:browser":"npm run build:test && dev-tool run test:vitest --no-test-proxy --browser","integration-test:node":"echo skipped","integration-test:browser":"echo skipped"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"sdk-type":"client","_resolved":"/mnt/vss/_work/1/packages/azure-logger/azure-logger-1.1.0.tgz","//metadata":{"migrationDate":"2023-03-08T18:36:03.000Z"},"_integrity":"sha512-BnfkfzVEsrgbVCtqq0RYRMePSH2lL/cgUUR5sYRF4yNN10zJZq/cODz0r89k3ykY83MqeM3twR292a3YBNgC3w==","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"10.2.4","description":"Microsoft Azure SDK for JavaScript - Logger","directories":{},"sideEffects":false,"_nodeVersion":"18.19.1","dependencies":{"tslib":"^2.6.2"},"_hasShrinkwrap":false,"devDependencies":{"tshy":"^1.11.1","dotenv":"^16.3.1","eslint":"^8.56.0","rimraf":"^5.0.5","vitest":"^1.3.1","prettier":"^3.2.5","playwright":"^1.41.2","typescript":"~5.3.3","@types/node":"^18.0.0","@azure/dev-tool":"^1.0.0","@vitest/browser":"^1.3.1","@microsoft/api-extractor":"^7.40.3","@vitest/coverage-istanbul":"^1.3.1","@azure/eslint-plugin-azure-sdk":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.1.0_1710371849777_0.03968105458805948","host":"s3://npm-registry-packages"},"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```bash\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**NOTE**: When logging requests and responses, we sanitize these objects to make sure things like `Authorization` headers that contain secrets are not logged.\n\nRequest and response bodies are never logged. Headers are redacted by default, unless present in the following list or explicitly allowed by the client SDK:\n\n- \"x-ms-client-request-id\",\n- \"x-ms-return-client-request-id\",\n- \"x-ms-useragent\",\n- \"x-ms-correlation-request-id\",\n- \"x-ms-request-id\",\n- \"client-request-id\",\n- \"ms-cv\",\n- \"return-client-request-id\",\n- \"traceparent\",\n- \"Access-Control-Allow-Credentials\",\n- \"Access-Control-Allow-Headers\",\n- \"Access-Control-Allow-Methods\",\n- \"Access-Control-Allow-Origin\",\n- \"Access-Control-Expose-Headers\",\n- \"Access-Control-Max-Age\",\n- \"Access-Control-Request-Headers\",\n- \"Access-Control-Request-Method\",\n- \"Origin\",\n- \"Accept\",\n- \"Accept-Encoding\",\n- \"Cache-Control\",\n- \"Connection\",\n- \"Content-Length\",\n- \"Content-Type\",\n- \"Date\",\n- \"ETag\",\n- \"Expires\",\n- \"If-Match\",\n- \"If-Modified-Since\",\n- \"If-None-Match\",\n- \"If-Unmodified-Since\",\n- \"Last-Modified\",\n- \"Pragma\",\n- \"Request-Id\",\n- \"Retry-After\",\n- \"Server\",\n- \"Transfer-Encoding\",\n- \"User-Agent\",\n- \"WWW-Authenticate\",\n\n## Examples\n\n### Example 1 - basic usage\n\n```ts snippet:ReadmeSampleBasicUsage\nimport { setLogLevel } from \"@azure/logger\";\n\nsetLogLevel(\"info\");\n```\n\n### Example 2 - redirect log output\n\n```ts snippet:ReadmeSampleRedirectLog\nimport { setLogLevel, AzureLogger } from \"@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 `npm run 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","publish_time":1710371850242,"_cnpm_publish_time":1710371850242,"dist-tags":{"dev":"1.3.1-alpha.20260306.4","latest":"1.4.0"}}