aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/images/Image.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 06:12:23 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 06:12:23 +0700
commitd4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 (patch)
tree9bb9b53e2823f73084780673763504f4098bae69 /src/main/java/cc/polyfrost/oneconfig/images/Image.java
parentd2b1d57120bb51e76191302a58d935afe52b89df (diff)
downloadOneConfig-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.java8
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;
}
}