{"name":"@octokit/plugin-request-log","version":"6.0.0","keywords":["github","api","sdk","toolkit"],"author":{"url":"https://twitter.com/gr2m","name":"Gregor Martynus"},"license":"MIT","_id":"@octokit/plugin-request-log@6.0.0","maintainers":[{"name":"octokitbot","email":"security+octokitbot@github.com"}],"homepage":"https://github.com/octokit/plugin-request-log.js#readme","bugs":{"url":"https://github.com/octokit/plugin-request-log.js/issues"},"dist":{"shasum":"de1c1e557df6c08adb631bf78264fa741e01b317","tarball":"http://registry-npm.ywwl.com/@octokit/plugin-request-log/download/@octokit/plugin-request-log-6.0.0.tgz","fileCount":7,"integrity":"sha512-UkOzeEN3W91/eBq9sPZNQ7sUBvYCqYbrrD8gTbBuGtHEuycE4/awMXcYvx6sVYo7LypPhmQwwpUe4Yyu4QZN5Q==","signatures":[{"sig":"MEUCICa8HSQu/VtVUkqsK2a51DqLZSgN6ao5c7JLtzcfSeBIAiEA/c7/nB6TTtqhyIG5AN1UM61a46eEcHJ90OzQT7IvYr0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@octokit%2fplugin-request-log@6.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5915,"size":2825,"noattachment":false,"key":"/@octokit/plugin-request-log/-/@octokit/plugin-request-log-6.0.0.tgz"},"type":"module","types":"dist-types/index.d.ts","engines":{"node":">= 20"},"exports":{".":{"types":"./dist-types/index.d.ts","import":"./dist-src/index.js","default":"./dist-src/index.js"}},"gitHead":"2181a52ff2f84387d66c289eb3b26efbccaa3f7e","_npmUser":{"name":"octokitbot","email":"security+octokitbot@github.com"},"repository":{"url":"git+https://github.com/octokit/plugin-request-log.js.git","type":"git"},"_npmVersion":"10.9.2","description":"Log all requests and request errors","directories":{},"sideEffects":false,"_nodeVersion":"22.15.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.1.4","esbuild":"^0.25.0","prettier":"3.5.3","fetch-mock":"^11.0.0","tinyglobby":"^0.2.13","typescript":"^5.0.0","@types/node":"^22.0.0","@octokit/core":"^7.0.0","@octokit/tsconfig":"^4.0.0","@vitest/coverage-v8":"^3.1.4","semantic-release-plugin-update-version-in-files":"^2.0.0"},"peerDependencies":{"@octokit/core":">=6"},"_npmOperationalInternal":{"tmp":"tmp/plugin-request-log_6.0.0_1747760495672_0.4860182748645623","host":"s3://npm-registry-packages-npm-production"},"readme":"# plugin-request-log.js\n\n> Log all requests and request errors\n\n[![@latest](https://img.shields.io/npm/v/@octokit/plugin-request-log.svg)](https://www.npmjs.com/package/@octokit/plugin-request-log)\n[![Build Status](https://github.com/octokit/plugin-request-log.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-request-log.js/actions?workflow=Test)\n\n## Usage\n\n<table>\n<tbody valign=top align=left>\n<tr><th>\nBrowsers\n</th><td width=100%>\n\nLoad `@octokit/plugin-request-log` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [esm.sh](https://esm.sh)\n\n```html\n<script type=\"module\">\n  import { Octokit } from \"https://esm.sh/@octokit/core\";\n  import { requestLog } from \"https://esm.sh/@octokit/plugin-request-log\";\n</script>\n```\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with `npm install @octokit/core @octokit/plugin-request-log`. Optionally replace `@octokit/core` with a core-compatible module\n\n```js\nimport { Octokit } from \"@octokit/core\";\nimport { requestLog } from \"@octokit/plugin-request-log\";\n```\n\n</td></tr>\n</tbody>\n</table>\n\n> [!IMPORTANT]\n> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `\"moduleResolution\": \"node16\", \"module\": \"node16\"`.\n>\n> See the TypeScript docs on [package.json \"exports\"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>\n> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)\n\n```js\nconst MyOctokit = Octokit.plugin(requestLog);\nconst octokit = new MyOctokit({ auth: \"secret123\" });\n\noctokit.request(\"GET /\");\n// logs \"GET / - 200 in 123ms\n\noctokit.request(\"GET /oops\");\n// logs \"GET / - 404 in 123ms\n```\n\nIn order to log all request options, the `log.debug` option needs to be set. We recommend the [console-log-level](https://github.com/watson/console-log-level) package for a configurable log level\n\n```js\nimport consoleLogLevel from \"console-log-level\";\nconst octokit = new MyOctokit({\n  log: consoleLogLevel({\n    auth: \"secret123\",\n    level: \"info\",\n  }),\n});\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1747760495869,"_cnpm_publish_time":1747760495869,"dist-tags":{"latest":"6.0.0"}}