Skip to content

Commit

Permalink
fix(log): use 'octokit.log.warn' instead of 'console.warn' (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscard0m committed Mar 3, 2022
1 parent 0c201a9 commit 054cefa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Expand Up @@ -103,7 +103,7 @@ export function throttling(octokit: Octokit, octokitOptions = {}) {
"secondary-limit",
state.onSecondaryRateLimit ||
function (...args: any[]) {
console.warn(
octokit.log.warn(
"[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"
);
return state.onAbuseLimit(...args);
Expand All @@ -113,7 +113,7 @@ export function throttling(octokit: Octokit, octokitOptions = {}) {
events.on("rate-limit", state.onRateLimit);
// @ts-ignore
events.on("error", (e) =>
console.warn("Error in throttling-plugin limit handler", e)
octokit.log.warn("Error in throttling-plugin limit handler", e)
);

// @ts-ignore
Expand Down

0 comments on commit 054cefa

Please sign in to comment.