Add sentry log support (#454)

* Add sentry log support

* Add sentry log support

* Update
This commit is contained in:
James
2019-05-31 01:15:09 -07:00
committed by Kyleeld
parent eee063a84e
commit 1299e8769d
4 changed files with 44 additions and 0 deletions

View File

@@ -81,4 +81,15 @@ public interface RuneLitePlusConfig extends Config
{
return false;
}
@ConfigItem(
keyName = "logOpt",
name = "Send logs",
description = "Send logs to help us analyze errors",
position = 4
)
default boolean logOpt()
{
return false;
}
}

View File

@@ -33,6 +33,7 @@ import java.awt.event.KeyEvent;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import io.sentry.Sentry;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.events.ConfigChanged;
@@ -157,6 +158,11 @@ public class RuneLitePlusPlugin extends Plugin
ClientUI.frame.setTitle(ClientUI.currentPresenceName);
}
if (config.logOpt())
{
Sentry.init("https://f0ed76be2fe847f8b9eb3620fa55d729@sentry.io/1468399?stacktrace.app.packages=net.runelite.client");
}
if (config.customPresence())
{
RuneLiteProperties.discordAppID = rlPlusDiscordApp;