Fix sentry

This commit is contained in:
md_5 2016-02-19 19:44:30 +11:00
parent d3d22bbec9
commit d575266522
3 changed files with 23 additions and 11 deletions

View File

@ -30,7 +30,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.kencochrane.raven</groupId> <groupId>net.kencochrane.raven</groupId>
<artifactId>raven-log4j2</artifactId> <artifactId>raven</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.md-5</groupId> <groupId>net.md-5</groupId>

View File

@ -7,21 +7,27 @@ import mineplex.bungee.motd.MotdManager;
import mineplex.bungee.playerCount.PlayerCount; import mineplex.bungee.playerCount.PlayerCount;
import mineplex.bungee.playerStats.PlayerStats; import mineplex.bungee.playerStats.PlayerStats;
import mineplex.bungee.playerTracker.PlayerTracker; import mineplex.bungee.playerTracker.PlayerTracker;
import mineplex.bungee.status.InternetStatus; import net.kencochrane.raven.DefaultRavenFactory;
import net.kencochrane.raven.RavenFactory; import net.kencochrane.raven.dsn.Dsn;
import net.kencochrane.raven.jul.SentryHandler; import net.kencochrane.raven.jul.SentryHandler;
import net.md_5.bungee.api.plugin.Plugin; import net.md_5.bungee.api.plugin.Plugin;
public class Mineplexer extends Plugin public class Mineplexer extends Plugin
{ {
@Override @Override
public void onEnable() public void onEnable() {
{ getProxy().getScheduler().runAsync(this, new Runnable() {
// Sentry setup @Override
Handler sentry = new SentryHandler(RavenFactory.ravenInstance("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323")); public void run() {
sentry.setLevel(Level.WARNING); // Sentry setup
getProxy().getLogger().addHandler(sentry); Handler sentry = new SentryHandler(new DefaultRavenFactory().createRavenInstance(
new Dsn("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323"
)));
sentry.setLevel(Level.WARNING);
getProxy().getLogger().addHandler(sentry);
}
});
new MotdManager(this); new MotdManager(this);
new LobbyBalancer(this); new LobbyBalancer(this);
PlayerCount playerCount = new PlayerCount(this); PlayerCount playerCount = new PlayerCount(this);

View File

@ -77,6 +77,12 @@
<version>1.4.7</version> <version>1.4.7</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>net.kencochrane.raven</groupId>
<artifactId>raven</artifactId>
<version>6.0.0</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>net.kencochrane.raven</groupId> <groupId>net.kencochrane.raven</groupId>
<artifactId>raven-log4j2</artifactId> <artifactId>raven-log4j2</artifactId>