diff --git a/pom.xml b/pom.xml index bbc0e7e..9ba218a 100644 --- a/pom.xml +++ b/pom.xml @@ -116,13 +116,6 @@ 0.5.0 - - - com.bugsnag - bugsnag - 2.0.0 - - org.slf4j diff --git a/src/main/java/net/frozenorb/apiv3/APIv3.java b/src/main/java/net/frozenorb/apiv3/APIv3.java index 18ca26a..1fd708e 100644 --- a/src/main/java/net/frozenorb/apiv3/APIv3.java +++ b/src/main/java/net/frozenorb/apiv3/APIv3.java @@ -1,6 +1,5 @@ package net.frozenorb.apiv3; -import com.bugsnag.Client; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.PropertyAccessor; @@ -75,7 +74,6 @@ import net.frozenorb.apiv3.serialization.jackson.InstantJsonSerializer; import net.frozenorb.apiv3.serialization.jackson.UuidJsonDeserializer; import net.frozenorb.apiv3.serialization.jackson.UuidJsonSerializer; import net.frozenorb.apiv3.serialization.mongodb.UuidCodecProvider; -import net.frozenorb.apiv3.unsorted.BugsnagSlf4jLogger; import org.bson.Document; import org.bson.codecs.BsonValueCodecProvider; import org.bson.codecs.DocumentCodecProvider; @@ -107,7 +105,6 @@ public final class APIv3 extends AbstractVerticle { vertxInstance = vertx; setupConfig(); setupDatabase(); - setupBugsnag(); setupHttpServer(); /*V2Importer converter = new V2Importer("mongodb://158.69.126.126", "minehq"); @@ -210,13 +207,6 @@ public final class APIv3 extends AbstractVerticle { return mongoJacksonMapper; } - private void setupBugsnag() { - Client bugsnag = new Client(config.getProperty("bugsnag.apiKey")); - bugsnag.setReleaseStage(config.getProperty("general.releaseStage")); - bugsnag.setProjectPackages("net.frozenorb.apiv3"); - bugsnag.setLogger(new BugsnagSlf4jLogger()); - } - private void setupHttpServer() { HttpServer webServer = vertx.createHttpServer( new HttpServerOptions() @@ -231,7 +221,7 @@ public final class APIv3 extends AbstractVerticle { http.route().method(HttpMethod.PUT).method(HttpMethod.POST).handler(BodyHandler.create()); http.route().handler(new ActorAttributeHandler()); http.route().handler(new AuthorizationHandler()); - http.exceptionHandler(Throwable::printStackTrace); // TODO: BUGSNAG + http.exceptionHandler(Throwable::printStackTrace); // TODO: The commented out routes diff --git a/src/main/java/net/frozenorb/apiv3/unsorted/BugsnagSlf4jLogger.java b/src/main/java/net/frozenorb/apiv3/unsorted/BugsnagSlf4jLogger.java deleted file mode 100644 index 6c14ac0..0000000 --- a/src/main/java/net/frozenorb/apiv3/unsorted/BugsnagSlf4jLogger.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.frozenorb.apiv3.unsorted; - -import com.bugsnag.Logger; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public final class BugsnagSlf4jLogger extends Logger { - - public void debug(String message) { - log.debug(message); - } - - public void info(String message) { - log.info(message); - } - - public void warn(String message) { - log.warn(message); - } - - public void warn(String message, Throwable ex) { - log.warn(message, ex); - } - - public void warn(Throwable ex) { - log.warn("error in bugsnag", ex); - } - -} \ No newline at end of file diff --git a/src/main/java/net/frozenorb/apiv3/util/ErrorUtils.java b/src/main/java/net/frozenorb/apiv3/util/ErrorUtils.java index b8edaa5..254102f 100644 --- a/src/main/java/net/frozenorb/apiv3/util/ErrorUtils.java +++ b/src/main/java/net/frozenorb/apiv3/util/ErrorUtils.java @@ -21,7 +21,6 @@ public class ErrorUtils { } public static void respondInternalError(RoutingContext ctx, Throwable error) { - // TODO: BUGSNAG error.printStackTrace(); respondGeneric(ctx, 500, "Internal error: " + error.getClass().getSimpleName()); }