/hg/icedtea-web: 3 new changesets
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Tue Oct 27 13:14:26 UTC 2015
changeset bdd20464e46c in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bdd20464e46c
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Oct 27 11:01:25 2015 +0100
Added and by default enabled possibility to write logs directly to file without java.util.logging
changeset ab554180bb58 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ab554180bb58
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Oct 27 12:19:17 2015 +0100
Added and by default enabled logging to files for client applications.
changeset 56bfa957a6b8 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=56bfa957a6b8
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Oct 27 14:13:23 2015 +0100
itweb-settings, debugging panel made aware about legacy log and client apps log
diffstat:
ChangeLog | 54 +++
netx/net/sourceforge/jnlp/config/Defaults.java | 10 +
netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java | 2 +
netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java | 58 ++-
netx/net/sourceforge/jnlp/resources/Messages.properties | 4 +
netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 6 +-
netx/net/sourceforge/jnlp/util/logging/FileLog.java | 98 +---
netx/net/sourceforge/jnlp/util/logging/LogConfig.java | 71 ++-
netx/net/sourceforge/jnlp/util/logging/OutputController.java | 48 ++-
netx/net/sourceforge/jnlp/util/logging/SingleStreamLogger.java | 10 +-
netx/net/sourceforge/jnlp/util/logging/filelogs/LogBasedFileLog.java | 101 +++++
netx/net/sourceforge/jnlp/util/logging/filelogs/WriterBasedFileLog.java | 100 +++++
tests/netx/unit/net/sourceforge/jnlp/util/logging/FileLogTest.java | 39 +-
tests/netx/unit/net/sourceforge/jnlp/util/logging/OutputControllerTest.java | 31 +-
tests/netx/unit/net/sourceforge/jnlp/util/logging/WriterBasedFileLogTest.java | 179 ++++++++++
15 files changed, 657 insertions(+), 154 deletions(-)
diffs (truncated from 1202 to 500 lines):
diff -r 42b4d8d98723 -r 56bfa957a6b8 ChangeLog
--- a/ChangeLog Thu Oct 15 14:57:48 2015 +0200
+++ b/ChangeLog Tue Oct 27 14:13:23 2015 +0100
@@ -1,3 +1,57 @@
+2015-10-27 Jiri Vanek <jvanek at redhat.com>
+
+ itweb-settings, debugging panel made aware about legacy log and client apps log
+ * netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java: added checboxes for
+ KEY_ENABLE_APPLICATION_LOGGING_TOFILE and KEY_ENABLE_LEGACY_LOGBASEDFILELOG
+ Cusotm config directory place was a bit repacked to be more compact and more useful.
+ * netx/net/sourceforge/jnlp/resources/Messages.properties: added labels
+ and tooltips for new checkboxes
+
+2015-10-27 Jiri Vanek <jvanek at redhat.com>
+
+ Added and by default enabled logging to files for client applications.
+ * netx/net/sourceforge/jnlp/config/Defaults.java: KEY_ENABLE_APPLICATION_LOGGING_TOFILE
+ added and set by default to true
+ * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: declared
+ KEY_ENABLE_APPLICATION_LOGGING_TOFILE
+ * netx/net/sourceforge/jnlp/util/logging/FileLog.java: next to createFileLog
+ can now does also createAppFileLog
+ * netx/net/sourceforge/jnlp/util/logging/LogConfig.java: made aware of
+ KEY_ENABLE_APPLICATION_LOGGING_TOFILE
+ * netx/net/sourceforge/jnlp/util/logging/OutputController.java: if logging
+ to file is enabled and logging to file for client applications is enabled
+ then output of client app is sent also to special file. Added new singleton of
+ AppFileLogHolder to keep instance of file log for client app. proceedHeader
+ extracted as separate method to be reused.
+
+2015-10-15 Jiri Vanek <jvanek at redhat.com>
+
+ Added and by default enabled possibility to write logs directly to
+ file without java.util.logging
+ * netx/net/sourceforge/jnlp/config/Defaults.java: (defaults) added new key
+ KEY_ENABLE_LEGACY_LOGBASEDFILELOG, by default false
+ * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: defined
+ KEY_ENABLE_LEGACY_LOGBASEDFILELOG for deployment.log.file.legacylog
+ * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: (exit) catch new exception
+ * netx/net/sourceforge/jnlp/util/logging/FileLog.java: removed all logic.
+ Now serve onl as factory provider of FileLog implementation
+ * netx/net/sourceforge/jnlp/util/logging/LogConfig.java: fixed indentation, made
+ aware about LOGBASEDFILELOG
+ * netx/net/sourceforge/jnlp/util/logging/OutputController.java: adapted to
+ autocloseable SingleStreamLogger
+ * netx/net/sourceforge/jnlp/util/logging/SingleStreamLogger.java: this interface
+ now extends AutoCloseable
+ * netx/net/sourceforge/jnlp/util/logging/filelogs/LogBasedFileLog.java: copy
+ of original FileLog. Writing to file is done via java.util.loggiing engine
+ * netx/net/sourceforge/jnlp/util/logging/filelogs/WriterBasedFileLog.java:
+ writing to file is done by simple buffered writer
+ * tests/netx/unit/net/sourceforge/jnlp/util/logging/FileLogTest.java: now tests
+ LogBasedFileLog
+ * tests/netx/unit/net/sourceforge/jnlp/util/logging/OutputControllerTest.java:
+ now tests WriterBasedFileLog instead of FileLog
+ * tests/netx/unit/net/sourceforge/jnlp/util/logging/WriterBasedFileLogTest.java:
+ Similar set of tests as are in FileLogTest but for WriterBasedFileLog
+
2015-10-15 Jiri Vanek <jvanek at redhat.com>
Broken file logging now dont crash itw
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/config/Defaults.java
--- a/netx/net/sourceforge/jnlp/config/Defaults.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java Tue Oct 27 14:13:23 2015 +0100
@@ -340,6 +340,16 @@
String.valueOf(false)
},
{
+ DeploymentConfiguration.KEY_ENABLE_APPLICATION_LOGGING_TOFILE,
+ BasicValueValidators.getBooleanValidator(),
+ String.valueOf(true)
+ },
+ {
+ DeploymentConfiguration.KEY_ENABLE_LEGACY_LOGBASEDFILELOG,
+ BasicValueValidators.getBooleanValidator(),
+ String.valueOf(false)
+ },
+ {
DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSTREAMS,
BasicValueValidators.getBooleanValidator(),
String.valueOf(true)
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Tue Oct 27 14:13:23 2015 +0100
@@ -178,6 +178,8 @@
public static final String KEY_ENABLE_LOGGING = "deployment.log"; //same as verbose or ICEDTEAPLUGIN_DEBUG=true
public static final String KEY_ENABLE_LOGGING_HEADERS = "deployment.log.headers"; //will add header OutputContorll.getHeader To all messages
public static final String KEY_ENABLE_LOGGING_TOFILE = "deployment.log.file";
+ public static final String KEY_ENABLE_APPLICATION_LOGGING_TOFILE ="deployment.log.file.clientapp"; //also client app will log to its separate file
+ public static final String KEY_ENABLE_LEGACY_LOGBASEDFILELOG = "deployment.log.file.legacylog";
public static final String KEY_ENABLE_LOGGING_TOSTREAMS = "deployment.log.stdstreams";
public static final String KEY_ENABLE_LOGGING_TOSYSTEMLOG = "deployment.log.system";
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/DebuggingPanel.java Tue Oct 27 14:13:23 2015 +0100
@@ -18,6 +18,7 @@
package net.sourceforge.jnlp.controlpanel;
+import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
@@ -56,6 +57,8 @@
DeploymentConfiguration.KEY_ENABLE_LOGGING,
DeploymentConfiguration.KEY_ENABLE_LOGGING_HEADERS,
DeploymentConfiguration.KEY_ENABLE_LOGGING_TOFILE,
+ DeploymentConfiguration.KEY_ENABLE_LEGACY_LOGBASEDFILELOG,
+ DeploymentConfiguration.KEY_ENABLE_APPLICATION_LOGGING_TOFILE,
DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSTREAMS,
DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSYSTEMLOG
@@ -76,6 +79,19 @@
addComponents();
}
+
+
+ private void fileLoggingAct(JCheckBox source, JCheckBox... targets) {
+ if (source.isSelected()) {
+ for (JCheckBox target : targets) {
+ target.setEnabled(true);
+ }
+ } else {
+ for (JCheckBox target : targets) {
+ target.setEnabled(false);
+ }
+ }
+ }
/**
* Add components to panel.
@@ -119,22 +135,35 @@
}
});
- JCheckBox[] debuggingOptions = {
+ final JCheckBox[] debuggingOptions = {
new JCheckBox(Translator.R("DPEnableLogging")),
new JCheckBox(Translator.R("DPEnableHeaders")),
new JCheckBox(Translator.R("DPEnableFile")),
+ new JCheckBox(Translator.R("DPEnableLegacyFileLog")),
+ new JCheckBox(Translator.R("DPEnableClientAppFileLogging")),
new JCheckBox(Translator.R("DPEnableStds")),
new JCheckBox(Translator.R("DPEnableSyslog"))
};
- String[] hints = {
+
+ debuggingOptions[2].addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ fileLoggingAct(debuggingOptions[2], debuggingOptions[3], debuggingOptions[4]);
+ }
+
+ });
+ final String[] hints = {
(Translator.R("DPEnableLoggingHint")),
(Translator.R("DPEnableHeadersHint")),
(Translator.R("DPEnableFileHint", LogConfig.getLogConfig().getIcedteaLogDir())),
+ (Translator.R("DPEnableLegacyFileLogHint")),
+ (Translator.R("DPEnableClientAppFileLoggingHint")),
(Translator.R("DPEnableStdsHint")),
(Translator.R("DPEnableSyslogHint"))
};
- ComboItem[] javaConsoleItems = { new ComboItem(Translator.R("DPDisable"), DeploymentConfiguration.CONSOLE_DISABLE),
+ final ComboItem[] javaConsoleItems = { new ComboItem(Translator.R("DPDisable"), DeploymentConfiguration.CONSOLE_DISABLE),
new ComboItem(Translator.R("DPHide"), DeploymentConfiguration.CONSOLE_HIDE),
new ComboItem(Translator.R("DPShow"), DeploymentConfiguration.CONSOLE_SHOW),
new ComboItem(Translator.R("DPShowPluginOnly"), DeploymentConfiguration.CONSOLE_SHOW_PLUGIN),
@@ -167,20 +196,30 @@
c.gridy++;
}
+ //move 5th and 6th checkbox below logsDestination
+ if (i == 3 || i == 4) {
+ c.gridx += 1;
+ if (i == 4) {
+ c.gridy--;
+ }
+ } else {
+ c.gridx = 0;
+ }
debuggingOptions[i].setSelected(Boolean.parseBoolean(s));
debuggingOptions[i].setActionCommand(properties[i]);
debuggingOptions[i].setToolTipText(hints[i]);
debuggingOptions[i].addItemListener(this);
add(debuggingOptions[i], c);
- if (i == 2) {
- c.gridx++;
- add(logsDestinationTitle, c);
+ if (i == 2) {
+ c.gridx++;
+ JPanel resetTitlePanel = new JPanel(new BorderLayout(10, 0));
+ resetTitlePanel.add(logsDestinationReset, BorderLayout.LINE_START);
+ resetTitlePanel.add(logsDestinationTitle, BorderLayout.LINE_END);
+ add(resetTitlePanel, c);
c.gridx++;
add(logsDestination, c);
- c.gridx++;
- add(logsDestinationReset, c);
- c.gridx-=3;
+ c.gridx -= 2;
}
}
@@ -200,6 +239,7 @@
c.gridy++;
c.weighty = 1;
add(filler, c);
+ fileLoggingAct(debuggingOptions[2], debuggingOptions[3], debuggingOptions[4]);
}
@Override
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Oct 27 14:13:23 2015 +0100
@@ -658,6 +658,10 @@
DPEnableHeaders=Enable headers
DPEnableHeadersHint=When this switch is on, each logged message have header with additional information like user, place in code and time
DPEnableFile=Enable logging to file
+DPEnableLegacyFileLog=Use java.util.logging instead of direct file writing
+DPEnableClientAppFileLogging=Fork client applications outputs also to file
+DPEnableLegacyFileLogHint=java.util.logging is know to deadlock rarely when used on applications with custom logging extensions
+DPEnableClientAppFileLoggingHint=Logging of client apps is known to sometimes not work with java.util.logging on
CPFilesLogsDestDir=File logs directory
CPFilesLogsDestDirResert=Reset to default
DPEnableFileHint=output messages will be saved to file in your {0} directory
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Tue Oct 27 14:13:23 2015 +0100
@@ -880,7 +880,11 @@
}
public static void exit(int i) {
- OutputController.getLogger().close();
+ try {
+ OutputController.getLogger().close();
+ } catch (Exception ex) {
+ //to late
+ }
System.exit(i);
}
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/util/logging/FileLog.java
--- a/netx/net/sourceforge/jnlp/util/logging/FileLog.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/util/logging/FileLog.java Tue Oct 27 14:13:23 2015 +0100
@@ -36,22 +36,21 @@
exception statement from your version. */
package net.sourceforge.jnlp.util.logging;
-import java.io.File;
-import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.logging.FileHandler;
-import java.util.logging.Formatter;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.logging.Logger;
-import net.sourceforge.jnlp.util.FileUtils;
+import net.sourceforge.jnlp.util.docprovider.TextsProvider;
+import net.sourceforge.jnlp.util.logging.filelogs.LogBasedFileLog;
+import net.sourceforge.jnlp.util.logging.filelogs.WriterBasedFileLog;
import net.sourceforge.jnlp.util.logging.headers.Header;
/**
- * This class writes log information to file.
+ * This class is utility and factory around file logs.
*/
-public final class FileLog implements SingleStreamLogger {
+public final class FileLog {
+
+ public static Header getHeadlineHeader() {
+ return new Header(OutputController.Level.WARNING_ALL, Thread.currentThread().getStackTrace(), Thread.currentThread(), false);
+ }
private static final class SingleStreamLoggerImpl implements SingleStreamLogger {
@@ -69,18 +68,28 @@
}
}
- private static SimpleDateFormat fileLogNameFormatter = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.S");
+ public static final SimpleDateFormat fileLogNameFormatter = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.S");
/**"Tue Nov 19 09:43:50 CET 2013"*/
- private static SimpleDateFormat pluginSharedFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy");
+ public static final SimpleDateFormat pluginSharedFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy");
+ public static final String defaultloggerName = TextsProvider.ITW + " file-logger";
- private final Logger impl;
- private final FileHandler fh;
- private static final String defaultloggerName = "IcedTea-Web file-logger";
- public static SingleStreamLogger createFileLog() {
+ public static SingleStreamLogger createFileLog() {
+ return createFileLog("javantx");
+ }
+
+ public static SingleStreamLogger createAppFileLog() {
+ return createFileLog("clienta");
+ }
+
+ private static SingleStreamLogger createFileLog(String id) {
SingleStreamLogger s;
try {
- s = new FileLog();
+ if (LogConfig.getLogConfig().isLegacyLogBasedFileLog()) {
+ s = new LogBasedFileLog(defaultloggerName, getFileName(id), false);
+ } else {
+ s = new WriterBasedFileLog(defaultloggerName, getFileName(id), false);
+ }
} catch (Exception ex) {
//we do not wont to block whole logging just because initialization error in "new FileLog()"
OutputController.getLogger().log(ex);
@@ -88,58 +97,13 @@
}
return s;
}
-
- private FileLog() {
- this(false);
+
+ private static String getFileName(String id) {
+ return LogConfig.getLogConfig().getIcedteaLogDir() + "itw-"+id+"-" + getStamp() + ".log";
}
- private FileLog(boolean append) {
- this(defaultloggerName, LogConfig.getLogConfig().getIcedteaLogDir() + "itw-javantx-" + getStamp() + ".log", append);
- }
-
- // testing constructor
- FileLog(String fileName, boolean append) {
- this(fileName, fileName, append);
- }
-
- private FileLog(String loggerName, String fileName, boolean append) {
- try {
- File futureFile = new File(fileName);
- if (!futureFile.exists()) {
- FileUtils.createRestrictedFile(futureFile, true);
- }
- fh = new FileHandler(fileName, append);
- fh.setFormatter(new Formatter() {
- @Override
- public String format(LogRecord record) {
- return record.getMessage() + "\n";
- }
- });
- impl = Logger.getLogger(loggerName);
- impl.setLevel(Level.ALL);
- impl.addHandler(fh);
- log(new Header(OutputController.Level.WARNING_ALL, Thread.currentThread().getStackTrace(), Thread.currentThread(), false).toString());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Log the String to file.
- *
- * @param s {@link Exception} that was thrown.
- */
- @Override
- public synchronized void log(String s) {
- impl.log(Level.FINE, s);
- }
-
- @Override
- public void close() {
- fh.close();
- }
-
- private static String getStamp() {
+
+ public static String getStamp() {
return fileLogNameFormatter.format(new Date());
}
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/util/logging/LogConfig.java
--- a/netx/net/sourceforge/jnlp/util/logging/LogConfig.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/util/logging/LogConfig.java Tue Oct 27 14:13:23 2015 +0100
@@ -52,32 +52,36 @@
private boolean enableLogging;
private boolean enableHeaders;
private boolean logToFile;
+ private boolean logClientAppToFile;
private boolean logToStreams;
private boolean logToSysLog;
-
+ private boolean legacyLogaAsedFileLog;
+
private LogConfig() {
- DeploymentConfiguration config = JNLPRuntime.getConfiguration();
- // Check whether logging and tracing is enabled.
- enableLogging = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING));
- //enagle disable headers
- enableHeaders = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_HEADERS));
- //enable/disable individual channels
- logToFile = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOFILE));
- logToStreams = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSTREAMS));
- logToSysLog = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSYSTEMLOG));
+ DeploymentConfiguration config = JNLPRuntime.getConfiguration();
+ // Check whether logging and tracing is enabled.
+ enableLogging = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING));
+ //enagle disable headers
+ enableHeaders = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_HEADERS));
+ //enable/disable individual channels
+ logToFile = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOFILE));
+ logToStreams = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSTREAMS));
+ logToSysLog = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING_TOSYSTEMLOG));
+ legacyLogaAsedFileLog = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LEGACY_LOGBASEDFILELOG));
+ logClientAppToFile = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_APPLICATION_LOGGING_TOFILE));
- // Get log directory, create it if it doesn't exist. If unable to create and doesn't exist, don't log.
- icedteaLogDir = PathsAndFiles.LOG_DIR.getFullPath();
- if (icedteaLogDir != null) {
- File f = new File(icedteaLogDir);
- if (f.isDirectory() || f.mkdirs()) {
- icedteaLogDir += File.separator;
- } else {
- enableLogging = false;
- }
+ // Get log directory, create it if it doesn't exist. If unable to create and doesn't exist, don't log.
+ icedteaLogDir = PathsAndFiles.LOG_DIR.getFullPath();
+ if (icedteaLogDir != null) {
+ File f = new File(icedteaLogDir);
+ if (f.isDirectory() || f.mkdirs()) {
+ icedteaLogDir += File.separator;
} else {
enableLogging = false;
}
+ } else {
+ enableLogging = false;
+ }
}
private static class LogConfigHolder {
@@ -91,9 +95,11 @@
return LogConfigHolder.INSTANCE;
}
- /** For testing only: throw away the previous config */
+ /**
+ * For testing only: throw away the previous config
+ */
static synchronized void resetLogConfig() {
- LogConfigHolder.INSTANCE = new LogConfig();
+ LogConfigHolder.INSTANCE = new LogConfig();
}
public String getIcedteaLogDir() {
@@ -119,11 +125,8 @@
public boolean isEnableHeaders() {
return enableHeaders;
}
-
-
-
+
//package private setters for testing
-
void setEnableHeaders(boolean enableHeaders) {
this.enableHeaders = enableHeaders;
}
@@ -151,5 +154,21 @@
boolean isLogToConsole() {
return JavaConsole.isEnabled();
}
-
+
+ boolean isLegacyLogBasedFileLog() {
+ return legacyLogaAsedFileLog;
+ }
+
+ boolean setLegacyLogBasedFileLog(boolean b) {
+ return legacyLogaAsedFileLog = b;
+ }
+
+ void serLogToFileForClientApp(boolean b) {
+ logClientAppToFile = b;
+ }
+
+ boolean isLogToFileForClientApp() {
+ return logClientAppToFile;
+ }
+
}
diff -r 42b4d8d98723 -r 56bfa957a6b8 netx/net/sourceforge/jnlp/util/logging/OutputController.java
--- a/netx/net/sourceforge/jnlp/util/logging/OutputController.java Thu Oct 15 14:57:48 2015 +0200
+++ b/netx/net/sourceforge/jnlp/util/logging/OutputController.java Tue Oct 27 14:13:23 2015 +0100
@@ -105,8 +105,8 @@
private static final String NULL_OBJECT = "Trying to log null object";
private PrintStreamLogger outLog;
private PrintStreamLogger errLog;
- private List<MessageWithHeader> messageQue = new LinkedList<MessageWithHeader>();
- private MessageQueConsumer messageQueConsumer = new MessageQueConsumer();
More information about the distro-pkg-dev
mailing list