Skip to content

Commit 0f388e7

Browse files
committed
chore: removed logs
1 parent 4b584e0 commit 0f388e7

File tree

3 files changed

+22
-29
lines changed

3 files changed

+22
-29
lines changed

src/integrations/nativescripterrorhandlers.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export class NativescriptErrorHandlers implements Integration {
5252
*/
5353
private _handleUnhandledRejections(): void {
5454
if (this._options.onunhandledrejection) {
55-
console.log('registering for uncaughtErrorEvent');
5655
application.on(application.uncaughtErrorEvent, this.globalHanderEvent, this);
5756
// const tracking = require('promise/setimmediate/rejection-tracking');
5857
// tracking.disable();
@@ -90,7 +89,6 @@ export class NativescriptErrorHandlers implements Integration {
9089
// }
9190
// handlingFatal = true;
9291
// }
93-
console.log('globalHander catched', error);
9492

9593
getCurrentHub().withScope(scope => {
9694
if (isFatal) {
@@ -124,10 +122,8 @@ export class NativescriptErrorHandlers implements Integration {
124122
private _handleOnError(): void {
125123
if (this._options.onerror) {
126124
// let handlingFatal = false;
127-
console.log('registering for discardedErrorEvent');
128125
application.on(application.discardedErrorEvent, this.globalHanderEvent, this);
129126

130-
console.log('setErrorHandler');
131127
trace.setErrorHandler({
132128
handlerError: this.globalHander
133129
});

src/nssentry.android.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -340,21 +340,20 @@ export namespace NSSentry {
340340
sentryClient.addShouldSendEventCallback(
341341
new io.sentry.event.helper.ShouldSendEventCallback({
342342
shouldSend(event: io.sentry.event.Event) {
343-
console.log('shouldSend', event.getSentryInterfaces());
344343
// We don't want to send events that are from ExceptionsManagerModule.
345344
// Because we sent it already from raven.
346-
if (event.getSentryInterfaces().containsKey(io.sentry.event.interfaces.ExceptionInterface.EXCEPTION_INTERFACE)) {
347-
const exceptionInterface = event.getSentryInterfaces().get(io.sentry.event.interfaces.ExceptionInterface.EXCEPTION_INTERFACE);
348-
if (
349-
exceptionInterface
350-
.getExceptions()
351-
.getFirst()
352-
.getExceptionClassName()
353-
.contains('JavascriptException')
354-
) {
355-
return false;
356-
}
357-
}
345+
// if (event.getSentryInterfaces().containsKey(io.sentry.event.interfaces.ExceptionInterface.EXCEPTION_INTERFACE)) {
346+
// const exceptionInterface = event.getSentryInterfaces().get(io.sentry.event.interfaces.ExceptionInterface.EXCEPTION_INTERFACE);
347+
// if (
348+
// exceptionInterface
349+
// .getExceptions()
350+
// .getFirst()
351+
// .getExceptionClassName()
352+
// .contains('JavascriptException')
353+
// ) {
354+
// return false;
355+
// }
356+
// }
358357
return true;
359358
}
360359
})

src/nssentry.ios.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ export namespace NSSentry {
1414
}
1515
export function sendEvent(event: Event): Promise<Response> {
1616
return new Promise((resolve, reject) => {
17-
console.log('sendEvent');
1817
const jsonData = NSString.stringWithString(JSON.stringify(event)).dataUsingEncoding(NSUTF8StringEncoding);
1918
const sentryEvent = SentryEvent.alloc().initWithJSON(jsonData);
2019
SentryClient.sharedClient.sendEventWithCompletionHandler(sentryEvent, function(error) {
21-
console.log('sendEventWithCompletionHandler', error);
2220
if (error) {
2321
reject(error);
2422
} else {
@@ -34,16 +32,16 @@ export namespace NSSentry {
3432
return new Promise(resolve => {
3533
const client = SentryClient.alloc().initWithDsnDidFailWithError(dsnString);
3634
// client.shouldSendEvent = (event: SentryEvent) => true;
37-
client.beforeSerializeEvent = (e: SentryEvent) => {
38-
console.log('beforeSerializeEvent3', e.exceptions, e.exceptions && e.exceptions.count > 0 && toJsObject(e.exceptions.objectAtIndex(0).serialize()), e.stacktrace);
39-
const stacktrace = e.stacktrace;
40-
if (stacktrace) {
41-
const frames = stacktrace.frames;
42-
frames.enumerateObjectsUsingBlock(p => {
43-
console.log('frame', p.fileName);
44-
});
45-
}
46-
};
35+
// client.beforeSerializeEvent = (e: SentryEvent) => {
36+
// console.log('beforeSerializeEvent3', e.exceptions, e.exceptions && e.exceptions.count > 0 && toJsObject(e.exceptions.objectAtIndex(0).serialize()), e.stacktrace);
37+
// const stacktrace = e.stacktrace;
38+
// if (stacktrace) {
39+
// const frames = stacktrace.frames;
40+
// frames.enumerateObjectsUsingBlock(p => {
41+
// console.log('frame', p.fileName);
42+
// });
43+
// }
44+
// };
4745
SentryClient.sharedClient = client;
4846
if (!!options.enableNativeCrashHandling) {
4947
SentryClient.sharedClient.startCrashHandlerWithError();

0 commit comments

Comments
 (0)