Refactor Argeo init
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / runtime / CmsStateImpl.java
index 4d1d698453015bd0e2f82e122b6899ec0a84f1e9..6fe8dcb7b2b5a175eec5141ec16674b8dbff34c9 100644 (file)
@@ -6,6 +6,7 @@ import java.io.Reader;
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
+import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -93,6 +94,9 @@ public class CmsStateImpl implements CmsState {
        }
 
        public void start() {
+               Charset defaultCharset = Charset.defaultCharset();
+               if (!StandardCharsets.UTF_8.equals(defaultCharset))
+                       log.error("Default JVM charset is " + defaultCharset + " and not " + StandardCharsets.UTF_8);
                try {
                        // First init check
                        Path privateBase = getDataPath(KernelConstants.DIR_PRIVATE);
@@ -255,7 +259,8 @@ public class CmsStateImpl implements CmsState {
                        log.debug("CMS stopping...  (" + this.uuid + ")");
 
                long duration = ((System.currentTimeMillis() - availableSince) / 1000) / 60;
-               log.info("## ARGEO CMS STOPPED after " + (duration / 60) + "h " + (duration % 60) + "min uptime ##");
+               log.info("## ARGEO CMS " + uuid + " STOPPED after " + (duration / 60) + "h " + (duration % 60)
+                               + "min uptime ##");
        }
 
        private void firstInit() throws IOException {