How to use the raven.captureMessage function in raven

To help you get started, we’ve selected a few raven 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 guzru / winston-sentry / sentry-transport.js View on Github external
if (level == 'error') {
      // Support exceptions logging
      if (meta instanceof Error) {
        if (msg == '') {
          msg = meta;
        } else {
          meta.message = msg + ". cause: " + meta.message;
          msg = meta;
        }
      }

      Raven.captureException(msg, extra, function() {
        callback(null, true);
      });
    } else {
      Raven.captureMessage(msg, extra, function() {
        callback(null, true);
      });
    }
  } catch(err) {
    console.error(err);
  }
};
github expo / expo-cli / packages / xdl / src / Sentry.ts View on Github external
export function logError(message: string, options?: any): void {
  // send error to Sentry
  // add `testing: true` to tags to avoid sending an email when testing
  Raven.captureMessage(message, getOptions(options));
}
github AdityaTD / PenguBot / events / eventError.js View on Github external
run(event, args, error) {
        this.client.emit("wtf", `[EVENT] ${event.path}\n${error ? error.stack ? error.stack : error : "Unknown error"}`);
        Raven.captureMessage(`eventError: ${event.name}\n${error ? error.stack ? error.stack : error : "Unknown error"}`);
    }
github AdityaTD / PenguBot / events / commandError.js View on Github external
run(message, command, params, error) {
        if (error instanceof Error) {
            this.client.emit("wtf", `[COMMAND] ${command.path}\n${error.stack || error}`);
            Raven.captureMessage(`commandError: ${command.name}\n${error.stack || error}`);
        }
        if (error.message) message.sendCode("JSON", error.message).catch(err => this.client.emit("wtf", err));
        else message.sendMessage(error).catch(err => this.client.emit("wtf", err));
    }
github caf203 / loggerv3 / src / miscellaneous / logger.js View on Github external
error: info => {
    console.log(chalk`${new Date()} {bold.red ERROR}: ${info}`)
    raven.captureMessage(info)
  },
  warn: info => console.log(chalk`${new Date()} {bold.yellow WARN}: ${info}`),
github mozilla-services / screenshots / server / src / ravenclient.js View on Github external
exports.sendRavenMessage = function(req, message, options) {
  if (!useRaven) {
    return;
  }
  options = makeOptionsFromRequest(req, options);
  Raven.captureMessage(message, options);
};
github MitocGroup / deep-framework / src / deep-log / lib / Driver / RavenBrowserDriver.js View on Github external
log(msg, level, context) {
    let nativeLevel = RavenBrowserDriver._mapLevel(level);


    Raven.captureMessage(msg, {
      level: nativeLevel,
      extra: context,
      tags: {
        originalLevel: level,
      },
    });
  }
github ghuser-io / ghuser.io / reframe / server / start.js View on Github external
return new Promise((resolve, _) => {
        if (process.env.SENTRY_DNS) {
          Raven.captureMessage(msg, resolve);
        } else {
          resolve();
        }
      });
    }
github apilayer / numvalidate / server / services / sentry.js View on Github external
exports.log = (msg, meta) => {
  if (sentryEnabled) {
    if (meta.level === 'error' || meta.level === 'fatal') {
      Raven.captureException(msg, meta);
    }
    Raven.captureMessage(msg, meta);
  }
};
github OpenNeuroOrg / openneuro / packages / openneuro-server / libs / orcid.js View on Github external
(err, res) => {
          if (err) {
            Raven.captureMessage('Unexpected ORCID failure', { err })
            reject(
              'An unexpected ORCID login failure occurred, please try again later.',
            )
          }
          const doc = new xmldoc.XmlDocument(res.body)
          let name = doc.valueWithPath(
            'person:person.person:name.personal-details:credit-name',
          )
          const firstname = doc.valueWithPath(
            'person:person.person:name.personal-details:given-names',
          )
          const lastname = doc.valueWithPath(
            'person:person.person:name.personal-details:family-name',
          )
          const email = doc.valueWithPath(
            'person:person.email:emails.email:email.email:email',