$ gnpm install @octokit/plugin-request-log
Log all requests and request errors
Browsers |
Load
|
---|---|
Node |
Install with
|
const MyOctokit = Octokit.plugin(requestLog);
const octokit = new MyOctokit({ auth: "secret123" });
octokit.request("GET /");
// logs "GET / - 200 in 123ms
octokit.request("GET /oops");
// logs "GET / - 404 in 123ms
In order to log all request options, the log.debug
option needs to be set. We recommend the console-log-level package for a configurable log level
const octokit = new MyOctokit({
log: require("console-log-level")({
auth: "secret123",
level: "info",
}),
});
See CONTRIBUTING.md
Copyright 2013 - present © cnpmjs.org | Home |