Skip to content

Commit b8a82ed

Browse files
committed
ref(feedback): Use debug instead of logger
1 parent cbff908 commit b8a82ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/feedback/src/core/integration.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
Integration,
66
IntegrationFn,
77
} from '@sentry/core';
8-
import { addIntegration, isBrowser, logger } from '@sentry/core';
8+
import { addIntegration, debug, isBrowser } from '@sentry/core';
99
import {
1010
ADD_SCREENSHOT_LABEL,
1111
CANCEL_BUTTON_LABEL,
@@ -194,7 +194,7 @@ export const buildFeedbackIntegration = ({
194194
addIntegration(modalIntegration);
195195
} catch {
196196
DEBUG_BUILD &&
197-
logger.error(
197+
debug.error(
198198
'[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`.',
199199
);
200200
throw new Error('[Feedback] Missing feedback modal integration!');
@@ -213,7 +213,7 @@ export const buildFeedbackIntegration = ({
213213
}
214214
} catch {
215215
DEBUG_BUILD &&
216-
logger.error('[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.');
216+
debug.error('[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.');
217217
}
218218

219219
const dialog = modalIntegration.createDialog({
@@ -243,7 +243,7 @@ export const buildFeedbackIntegration = ({
243243
typeof el === 'string' ? DOCUMENT.querySelector(el) : typeof el.addEventListener === 'function' ? el : null;
244244

245245
if (!targetEl) {
246-
DEBUG_BUILD && logger.error('[Feedback] Unable to attach to target element');
246+
DEBUG_BUILD && debug.error('[Feedback] Unable to attach to target element');
247247
throw new Error('Unable to attach to target element');
248248
}
249249

packages/feedback/src/modal/components/Form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
FeedbackScreenshotIntegration,
55
SendFeedback,
66
} from '@sentry/core';
7-
import { logger } from '@sentry/core';
7+
import { debug } from '@sentry/core';
88
import type { JSX, VNode } from 'preact';
99
import { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars
1010
import { useCallback, useState } from 'preact/hooks';
@@ -130,7 +130,7 @@ export function Form({
130130
);
131131
onSubmitSuccess(data, eventId);
132132
} catch (error) {
133-
DEBUG_BUILD && logger.error(error);
133+
DEBUG_BUILD && debug.error(error);
134134
setError(error as string);
135135
onSubmitError(error as Error);
136136
}

0 commit comments

Comments
 (0)