From 4a48f1cf6caab40fa3741d93f8c825078e4820f2 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 04 May 2007 21:15:31 +0000
Subject: [PATCH] Fix a number of issues with David's approval:
---
opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
index 74456e7..2202c6d 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallLauncher.java
@@ -26,11 +26,14 @@
*/
package org.opends.quicksetup.installer;
+import java.io.File;
import java.util.ArrayList;
+import java.util.logging.Logger;
import org.opends.quicksetup.Launcher;
import org.opends.quicksetup.CliApplication;
import org.opends.quicksetup.Installation;
+import org.opends.quicksetup.QuickSetupLog;
import org.opends.quicksetup.util.Utils;
/**
@@ -41,6 +44,16 @@
*/
public class InstallLauncher extends Launcher {
+ /** Prefix for log files. */
+ static public final String LOG_FILE_PREFIX = "opends-setup-";
+
+ /** Suffix for log files. */
+ static public final String LOG_FILE_SUFFIX = ".log";
+
+ static private final Logger LOG =
+ Logger.getLogger(InstallLauncher.class.getName());
+
+
/**
* The main method which is called by the setup command lines.
*
@@ -49,6 +62,13 @@
* will pass to the org.opends.server.tools.InstallDS class.
*/
public static void main(String[] args) {
+ try {
+ QuickSetupLog.initLogFileHandler(
+ File.createTempFile(LOG_FILE_PREFIX, LOG_FILE_SUFFIX));
+ } catch (Throwable t) {
+ System.err.println("Unable to initialize log");
+ t.printStackTrace();
+ }
new InstallLauncher(args).launch();
}
@@ -89,8 +109,16 @@
/**
* {@inheritDoc}
*/
- protected void guiLaunchFailed() {
- System.err.println(getMsg("setup-launcher-gui-launched-failed"));
+ protected void guiLaunchFailed(String logFileName) {
+ if (logFileName != null)
+ {
+ System.err.println(getMsg("setup-launcher-gui-launched-failed-details",
+ logFileName));
+ }
+ else
+ {
+ System.err.println(getMsg("setup-launcher-gui-launched-failed"));
+ }
}
/**
--
Gitblit v1.10.0