Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Stop reporting crashes to piwik (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
aluxian authored Mar 8, 2017
1 parent a779381 commit bdb1774
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/scripts/common/utils/logger.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import util from 'util';
import path from 'path';

import eventCategories from 'common/analytics/categories';
import eventActions from 'common/analytics/actions';
import eventNames from 'common/analytics/names';

function namespaceOfFile (filename) {
const app = require('common/electron/app').default;
const appPath = path.join(app.getAppPath(), 'scripts') + path.sep;
Expand All @@ -24,18 +20,6 @@ function namespaceOfFile (filename) {
return global.manifest.name + ':' + name;
}

function reportToPiwik (namespace, isFatal, err) {
const piwik = require('common/services/piwik').default.getTracker();
if (piwik) {
piwik.trackEvent(
eventCategories['Logs'],
eventActions['Exception'],
isFatal ? eventNames['Fatal Error'] : eventNames['Error'],
`${namespace}: ${err.name}: ${err.message}`
);
}
}

function reportToSentry (namespace, isFatal, err) {
const sentry = require('common/services/sentry').default;
if (sentry) {
Expand Down Expand Up @@ -93,7 +77,6 @@ export function errorLogger (filename, isFatal) {
browserLogger.printError(namespace, isFatal, err.stack);

if (!skipReporting && !global.options.debug) {
reportToPiwik(namespace, isFatal, err);
reportToSentry(namespace, isFatal, err);
}
};
Expand Down

0 comments on commit bdb1774

Please sign in to comment.