How to use the @sentry/core.logger.warn function in @sentry/core

To help you get started, we’ve selected a few @sentry/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getsentry / sentry-javascript / packages / browser / src / integrations / dedupe.ts View on Github external
public shouldDropEvent(currentEvent: SentryEvent, previousEvent?: SentryEvent): boolean {
    if (!previousEvent) {
      return false;
    }

    if (this.isSameMessageEvent(currentEvent, previousEvent)) {
      logger.warn(
        `Event dropped due to being a duplicate of previous event (same message).\nEvent: ${getEventDescription(
          currentEvent,
        )}`,
      );
      return true;
    }

    if (this.isSameExceptionEvent(currentEvent, previousEvent)) {
      logger.warn(
        `Event dropped due to being a duplicate of previous event (same exception).\nEvent: ${getEventDescription(
          currentEvent,
        )}`,
      );
      return true;
    }

    return false;
  }
github getsentry / sentry-javascript / packages / browser / src / integrations / dedupe.ts View on Github external
public shouldDropEvent(currentEvent: SentryEvent, previousEvent?: SentryEvent): boolean {
    if (!previousEvent) {
      return false;
    }

    if (this.isSameMessageEvent(currentEvent, previousEvent)) {
      logger.warn(
        `Event dropped due to being a duplicate of previous event (same message).\nEvent: ${getEventDescription(
          currentEvent,
        )}`,
      );
      return true;
    }

    if (this.isSameExceptionEvent(currentEvent, previousEvent)) {
      logger.warn(
        `Event dropped due to being a duplicate of previous event (same exception).\nEvent: ${getEventDescription(
          currentEvent,
        )}`,
      );
      return true;
    }