Added warn notifications for dev mode error logs

This commit is contained in:
Rsl1122 2018-02-07 11:43:30 +02:00
parent 7d64a4bfbb
commit 6d941766f1
4 changed files with 4 additions and 5 deletions

View File

@ -142,6 +142,7 @@ public class ConnectionOut {
throw new ConnectionFailException("Connection timed out after 10 seconds.", e);
} catch (NoSuchAlgorithmException | KeyManagementException | IOException e) {
if (Settings.DEV_MODE.isTrue()) {
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
Log.toLog(this.getClass().getName(), e);
}
ConnectionLog.logConnectionTo(toServer, infoRequest, -1);

View File

@ -52,7 +52,8 @@ public class RequestHandler implements HttpHandler {
response.send(exchange);
} catch (Exception e) {
if (Settings.DEV_MODE.isTrue()) {
e.printStackTrace();
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
Log.toLog(this.getClass(), e);
}
} finally {
exchange.close();

View File

@ -6,7 +6,6 @@ package com.djrapitops.plan.system.webserver.webapi;
import com.djrapitops.plan.api.exceptions.connection.*;
import com.djrapitops.plan.system.info.server.ServerInfo;
import com.djrapitops.plan.system.settings.Settings;
import com.djrapitops.plan.system.webserver.response.Response;
import com.djrapitops.plan.system.webserver.response.api.BadRequestResponse;
import com.djrapitops.plan.system.webserver.response.api.SuccessResponse;
@ -125,9 +124,6 @@ public abstract class WebAPI {
} catch (SocketTimeoutException e) {
throw new ConnectionFailException("Connection timed out after 10 seconds.", e);
} catch (NoSuchAlgorithmException | KeyManagementException | IOException e) {
if (Settings.DEV_MODE.isTrue()) {
Log.toLog(this.getClass().getName(), e);
}
throw new ConnectionFailException("API connection failed. address: " + address, e);
}
}

View File

@ -75,6 +75,7 @@ public class PlayersTableCreator {
));
} catch (NullPointerException e) {
if (Settings.DEV_MODE.isTrue()) {
Log.warn("THIS ERROR IS ONLY LOGGED IN DEV MODE:");
Log.toLog(PlayersTableCreator.class.getName(), e);
}
}