client: Sentry logging
This commit is contained in:
@@ -32,6 +32,8 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
import io.reactivex.Completable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import io.sentry.Sentry;
|
||||
import io.sentry.SentryClient;
|
||||
import java.io.File;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
@@ -244,6 +246,10 @@ public class RuneLite
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SentryClient client = Sentry.init("https://fa31d674e44247fa93966c69a903770f@sentry.io/1811856");
|
||||
client.setRelease(RuneLiteProperties.getPlusVersion());
|
||||
|
||||
final ClientLoader clientLoader = new ClientLoader(options.valueOf(updateMode));
|
||||
Completable.fromAction(clientLoader::get)
|
||||
.subscribeOn(Schedulers.single())
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.sentry.Sentry;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -54,15 +55,7 @@ public class EventBus implements EventBusInterface
|
||||
.cast(eventClass) // Cast it for easier usage
|
||||
.subscribe(action, error ->
|
||||
{
|
||||
if (error instanceof RuntimeException)
|
||||
{
|
||||
log.error("Runtime Exception in eventbus", error);
|
||||
System.exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.error("Exception in eventbus", error);
|
||||
}
|
||||
Sentry.capture(error);
|
||||
});
|
||||
|
||||
getCompositeDisposable(lifecycle).add(disposable);
|
||||
@@ -84,15 +77,7 @@ public class EventBus implements EventBusInterface
|
||||
.doFinally(() -> unregister(lifecycle))
|
||||
.subscribe(action, error ->
|
||||
{
|
||||
if (error instanceof RuntimeException)
|
||||
{
|
||||
log.error("Runtime Exception in eventbus", error);
|
||||
System.exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.error("Exception in eventbus", error);
|
||||
}
|
||||
Sentry.capture(error);
|
||||
});
|
||||
|
||||
getCompositeDisposable(lifecycle).add(disposable);
|
||||
|
||||
Reference in New Issue
Block a user