From 054cefa828fe6bf4db3c8962a2f140ecacebee37 Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Thu, 3 Mar 2022 20:19:53 +0100 Subject: [PATCH] fix(log): use 'octokit.log.warn' instead of 'console.warn' (#459) --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1674ee94..d0fead83 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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); @@ -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