diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
commit | d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 (patch) | |
tree | 9bb9b53e2823f73084780673763504f4098bae69 /src/main/java/cc/polyfrost/oneconfig/images/Image.java | |
parent | d2b1d57120bb51e76191302a58d935afe52b89df (diff) | |
download | OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.gz OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.bz2 OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.zip |
Separate Minecraft dependant and non-dependant code
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/images/Image.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/images/Image.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/images/Image.java b/src/main/java/cc/polyfrost/oneconfig/images/Image.java index 5e695e5..16957c1 100644 --- a/src/main/java/cc/polyfrost/oneconfig/images/Image.java +++ b/src/main/java/cc/polyfrost/oneconfig/images/Image.java @@ -1,9 +1,10 @@ package cc.polyfrost.oneconfig.images; -import cc.polyfrost.oneconfig.internal.OneConfig; import cc.polyfrost.oneconfig.utils.IOUtils; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.imageio.ImageIO; import java.awt.*; @@ -20,6 +21,7 @@ import java.util.Objects; /** An Image wrapper class that is used by the OneConfig system.*/ @SuppressWarnings("unused") public class Image { + private static final Logger LOGGER = LogManager.getLogger("OneConfig Images"); private BufferedImage image; private Graphics2D graphics = null; private final int width, height; @@ -152,7 +154,7 @@ public class Image { byteOut.close(); writer.close(); if(con.getResponseCode() != 200) { - OneConfig.LOGGER.error("Error uploading image to Imgur: " + con.getResponseCode()); + LOGGER.error("Error uploading image to Imgur: " + con.getResponseCode()); return null; } @@ -163,7 +165,7 @@ public class Image { return object; } catch (Exception e) { e.printStackTrace(); - OneConfig.LOGGER.error("Error uploading image to Imgur."); + LOGGER.error("Error uploading image to Imgur."); return null; } } |