How to use the @sentry/types.Severity.Log function in @sentry/types

To help you get started, we’ve selected a few @sentry/types 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 / node / src / integrations / console.ts View on Github external
switch (level) {
        case 'debug':
          sentryLevel = Severity.Debug;
          break;
        case 'error':
          sentryLevel = Severity.Error;
          break;
        case 'info':
          sentryLevel = Severity.Info;
          break;
        case 'warn':
          sentryLevel = Severity.Warning;
          break;
        default:
          sentryLevel = Severity.Log;
      }

      return function(): any {
        if (getCurrentHub().getIntegration(Console)) {
          getCurrentHub().addBreadcrumb(
            {
              category: 'console',
              level: sentryLevel,
              message: util.format.apply(undefined, arguments),
            },
            {
              input: [...arguments],
              level,
            },
          );
        }