{"name":"@octokit/plugin-request-log","version":"4.0.0","description":"Log all requests and request errors","repository":{"type":"git","url":"git+https://github.com/octokit/plugin-request-log.js.git"},"keywords":["github","api","sdk","toolkit"],"author":{"name":"Gregor Martynus","url":"https://twitter.com/gr2m"},"license":"MIT","peerDependencies":{"@octokit/core":">=5"},"devDependencies":{"@octokit/core":"^5.0.0","@octokit/tsconfig":"^2.0.0","@types/fetch-mock":"^7.3.2","@types/jest":"^29.0.0","@types/node":"^18.0.0","esbuild":"^0.18.0","fetch-mock":"npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1","glob":"^10.2.7","jest":"^29.0.0","prettier":"3.0.0","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0"},"publishConfig":{"access":"public"},"engines":{"node":">= 18"},"main":"dist-node/index.js","browser":"dist-web/index.js","types":"dist-types/index.d.ts","module":"dist-src/index.js","sideEffects":false,"gitHead":"ba7dbc09c68ee001498abae76f15bfe5a0fb2733","bugs":{"url":"https://github.com/octokit/plugin-request-log.js/issues"},"homepage":"https://github.com/octokit/plugin-request-log.js#readme","_id":"@octokit/plugin-request-log@4.0.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA==","shasum":"260fa6970aa97bbcbd91f99f3cd812e2b285c9f1","tarball":"http://registry-npm.ywwl.com/@octokit/plugin-request-log/download/@octokit/plugin-request-log-4.0.0.tgz","fileCount":11,"unpackedSize":10892,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUiTgktSWiekKpIDicTfmvHNE6ZhX26BN226mYLCgsIAiEA2YrbmL21BTTokr3q1zQZXPROcSJ6rAbG+aupvBzMlYc="}],"size":3485,"noattachment":false,"key":"/@octokit/plugin-request-log/-/@octokit/plugin-request-log-4.0.0.tgz"},"_npmUser":{"name":"octokitbot","email":"security+octokitbot@github.com"},"directories":{},"maintainers":[{"name":"kfcampbell","email":"kfcampbell@github.com"},{"name":"nickfloyd","email":"nicholas.floyd.info@gmail.com"},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"octokitbot","email":"security+octokitbot@github.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-request-log_4.0.0_1689030102465_0.03675310282030031"},"_hasShrinkwrap":false,"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":1689030102670,"_cnpm_publish_time":1689030102670,"dist-tags":{"latest":"6.0.0"}}