auto-sync
This commit is contained in:
parent
90ecd0e92b
commit
48996efdf2
|
@ -36,10 +36,12 @@ public enum FileLog {
|
||||||
@Nullable
|
@Nullable
|
||||||
private OutputStream fileLog; // null if not opened yet or already closed
|
private OutputStream fileLog; // null if not opened yet or already closed
|
||||||
|
|
||||||
private FileLog() {
|
FileLog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
if (fileLog != null)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
fileLog = openLog();
|
fileLog = openLog();
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class Launcher {
|
||||||
public Launcher(String port) {
|
public Launcher(String port) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
staticFrame = frame.getFrame();
|
staticFrame = frame.getFrame();
|
||||||
FileLog.MAIN.start();
|
|
||||||
FileLog.MAIN.logLine("Console " + CONSOLE_VERSION);
|
FileLog.MAIN.logLine("Console " + CONSOLE_VERSION);
|
||||||
|
|
||||||
getConfig().getRoot().setProperty(PORT_KEY, port);
|
getConfig().getRoot().setProperty(PORT_KEY, port);
|
||||||
|
@ -183,6 +182,7 @@ public class Launcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(final String[] args) throws Exception {
|
public static void main(final String[] args) throws Exception {
|
||||||
|
FileLog.MAIN.start();
|
||||||
getConfig().load();
|
getConfig().load();
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
|
||||||
VersionChecker.start();
|
VersionChecker.start();
|
||||||
|
|
|
@ -165,6 +165,7 @@ public class StartupFrame {
|
||||||
private void findAndApplyPorts() {
|
private void findAndApplyPorts() {
|
||||||
List<String> ports = findAllAvailablePorts();
|
List<String> ports = findAllAvailablePorts();
|
||||||
if (!currentlyDisplayedPorts.equals(ports) || isFirstTimeApplyingPorts) {
|
if (!currentlyDisplayedPorts.equals(ports) || isFirstTimeApplyingPorts) {
|
||||||
|
FileLog.MAIN.logLine("Available ports " + ports);
|
||||||
isFirstTimeApplyingPorts = false;
|
isFirstTimeApplyingPorts = false;
|
||||||
connectPanel.setVisible(!ports.isEmpty());
|
connectPanel.setVisible(!ports.isEmpty());
|
||||||
noPortsMessage.setVisible(ports.isEmpty());
|
noPortsMessage.setVisible(ports.isEmpty());
|
||||||
|
|
Loading…
Reference in New Issue