@octokit/plugin-request-log
Advanced tools
Comparing version 5.1.1 to 5.2.0
@@ -9,9 +9,11 @@ import { VERSION } from "./version.js"; | ||
return request(options).then((response) => { | ||
const requestId = response.headers["x-github-request-id"]; | ||
octokit.log.info( | ||
`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms` | ||
`${requestOptions.method} ${path} - ${response.status} with id ${requestId} in ${Date.now() - start}ms` | ||
); | ||
return response; | ||
}).catch((error) => { | ||
octokit.log.info( | ||
`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms` | ||
const requestId = error.response.headers["x-github-request-id"] || "UNKNOWN"; | ||
octokit.log.error( | ||
`${requestOptions.method} ${path} - ${error.status} with id ${requestId} in ${Date.now() - start}ms` | ||
); | ||
@@ -18,0 +20,0 @@ throw error; |
@@ -1,4 +0,4 @@ | ||
const VERSION = "5.1.1"; | ||
const VERSION = "5.2.0"; | ||
export { | ||
VERSION | ||
}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "5.1.1"; | ||
export declare const VERSION = "5.2.0"; |
{ | ||
"name": "@octokit/plugin-request-log", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"description": "Log all requests and request errors", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6000
40