From b610d0a31a7c4afe6686a60b91d4486f72854d1a Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 28 Aug 2020 07:33:42 +0400 Subject: [PATCH] Added default charset information in startup logs --- Mage.Client/src/main/java/mage/client/MageFrame.java | 2 ++ Mage.Server/src/main/java/mage/server/Main.java | 2 ++ .../java/org/mage/test/serverside/base/MageTestPlayerBase.java | 3 +++ 3 files changed, 7 insertions(+) diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index 6787ecb951..b4c8b1bd74 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -67,6 +67,7 @@ import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.net.SocketException; +import java.nio.charset.Charset; import java.util.*; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -1268,6 +1269,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { System.setProperty("java.util.Arrays.useLegacyMergeSort", "true"); LOGGER.info("Starting MAGE client version " + VERSION); LOGGER.info("Logging level: " + LOGGER.getEffectiveLevel()); + LOGGER.info("Default charset: " + Charset.defaultCharset()); startTime = System.currentTimeMillis(); Thread.setDefaultUncaughtExceptionHandler((t, e) -> LOGGER.fatal(null, e)); diff --git a/Mage.Server/src/main/java/mage/server/Main.java b/Mage.Server/src/main/java/mage/server/Main.java index 805239efd8..a9b617cd7c 100644 --- a/Mage.Server/src/main/java/mage/server/Main.java +++ b/Mage.Server/src/main/java/mage/server/Main.java @@ -39,6 +39,7 @@ import java.io.File; import java.io.IOException; import java.net.InetAddress; import java.net.MalformedURLException; +import java.nio.charset.Charset; import java.util.*; /** @@ -68,6 +69,7 @@ public final class Main { System.setProperty("java.util.Arrays.useLegacyMergeSort", "true"); logger.info("Starting MAGE server version " + version); logger.info("Logging level: " + logger.getEffectiveLevel()); + logger.info("Default charset: " + Charset.defaultCharset()); String adminPassword = ""; for (String arg : args) { diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java index fadd7761a6..4889220447 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java @@ -31,6 +31,7 @@ import org.mage.test.player.TestPlayer; import java.io.File; import java.io.FileNotFoundException; +import java.nio.charset.Charset; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -104,6 +105,8 @@ public abstract class MageTestPlayerBase { Logger.getRootLogger().setLevel(Level.DEBUG); logger.debug("Starting MAGE tests"); logger.debug("Logging level: " + logger.getLevel()); + logger.debug("Default charset: " + Charset.defaultCharset()); + deleteSavedGames(); ConfigSettings config = ConfigSettings.instance; for (GamePlugin plugin : config.getGameTypes()) {