diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-09-25 22:47:15 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-09-25 22:47:15 +1200 |
commit | c1b6fb0e25020b845b059aef0adebeac7d90ed7c (patch) | |
tree | bf52439140ecd372ff2e6a7c0aab634059c6aa46 /src/org/traccar/Main.java | |
parent | e9f466d5169fbbdea0e780a3a7b8221481035ec3 (diff) | |
download | trackermap-server-c1b6fb0e25020b845b059aef0adebeac7d90ed7c.tar.gz trackermap-server-c1b6fb0e25020b845b059aef0adebeac7d90ed7c.tar.bz2 trackermap-server-c1b6fb0e25020b845b059aef0adebeac7d90ed7c.zip |
Small refactoring
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r-- | src/org/traccar/Main.java | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java index 144ad1ec7..b7ae3e924 100644 --- a/src/org/traccar/Main.java +++ b/src/org/traccar/Main.java @@ -15,38 +15,11 @@ */ package org.traccar; -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryMXBean; -import java.lang.management.OperatingSystemMXBean; -import java.lang.management.RuntimeMXBean; import java.util.Locale; import org.traccar.helper.Log; public class Main { - private static void printSystemInfo() { - try { - OperatingSystemMXBean operatingSystemBean = ManagementFactory.getOperatingSystemMXBean(); - Log.info("Operating System" + - " name: " + operatingSystemBean.getName() + - " version: " + operatingSystemBean.getVersion() + - " architecture: " + operatingSystemBean.getArch()); - - RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean(); - Log.info("Java Runtime" + - " name: " + runtimeBean.getVmName() + - " vendor: " + runtimeBean.getVmVendor() + - " version: " + runtimeBean.getVmVersion()); - - MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean(); - Log.info("Memory Limit" + - " heap: " + memoryBean.getHeapMemoryUsage().getMax() / (1024 * 1024) + "mb" + - " non-heap: " + memoryBean.getNonHeapMemoryUsage().getMax() / (1024 * 1024) + "mb"); - } catch (Exception e) { - Log.warning("Failed to get system info"); - } - } - public static void main(String[] args) throws Exception { Locale.setDefault(Locale.ENGLISH); @@ -54,7 +27,7 @@ public class Main { service.init(args); Log.info("Starting server..."); - printSystemInfo(); + Log.logSystemInfo(); service.start(); |