Skip to content

Commit

Permalink
docs(README): update for ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Mar 5, 2024
1 parent f1da016 commit b215a25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Node
Install with `npm install @octokit/core @octokit/plugin-request-log`. Optionally replace `@octokit/core` with a core-compatible module

```js
const { Octokit } = require("@octokit/core");
const { requestLog } = require("@octokit/plugin-request-log");
import { Octokit } from "@octokit/core";
import { requestLog } from "@octokit/plugin-request-log";
```

</td></tr>
Expand All @@ -52,8 +52,9 @@ octokit.request("GET /oops");
In 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

```js
import consoleLogLevel from "console-log-level";
const octokit = new MyOctokit({
log: require("console-log-level")({
log: consoleLogLevel({
auth: "secret123",
level: "info",
}),
Expand Down

0 comments on commit b215a25

Please sign in to comment.