Mercurial > hg > release > icedtea-web-1.7
changeset 1423:a75145805b3f
FileLog.java: on windows, name of logs do not contain colons
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Thu, 11 May 2017 12:56:46 +0200 |
parents | 7d8419b9aece |
children | 63d4836a377c |
files | ChangeLog netx/net/sourceforge/jnlp/util/logging/FileLog.java |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed May 10 19:23:53 2017 +0200 +++ b/ChangeLog Thu May 11 12:56:46 2017 +0200 @@ -1,3 +1,7 @@ +2017-05-11 Jiri Vanek <jvanek@redhat.com> + + * netx/net/sourceforge/jnlp/util/logging/FileLog.java: on windows, name of logs do not contain colons + 2017-05-10 Jiri Vanek <jvanek@redhat.com> Added support for pure windows image and distribute-able windows-bin-dist archive
--- a/netx/net/sourceforge/jnlp/util/logging/FileLog.java Wed May 10 19:23:53 2017 +0200 +++ b/netx/net/sourceforge/jnlp/util/logging/FileLog.java Thu May 11 12:56:46 2017 +0200 @@ -38,6 +38,7 @@ import java.text.SimpleDateFormat; import java.util.Date; +import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.util.docprovider.TextsProvider; import net.sourceforge.jnlp.util.logging.filelogs.LogBasedFileLog; import net.sourceforge.jnlp.util.logging.filelogs.WriterBasedFileLog; @@ -51,6 +52,14 @@ public static Header getHeadlineHeader() { return new Header(OutputController.Level.WARNING_ALL, Thread.currentThread().getStackTrace(), Thread.currentThread(), false); } + + private static String getColon() { + if (JNLPRuntime.isWindows()) { + return "_"; + } else { + return ":"; + } + } private static final class SingleStreamLoggerImpl implements SingleStreamLogger { @@ -68,9 +77,9 @@ } } - public static final SimpleDateFormat fileLogNameFormatter = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.S"); + public static final SimpleDateFormat fileLogNameFormatter = new SimpleDateFormat("yyyy-MM-dd_HH"+getColon()+"mm:ss.S"); /**"Tue Nov 19 09:43:50 CET 2013"*/ - public static final SimpleDateFormat pluginSharedFormatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy"); + public static final SimpleDateFormat pluginSharedFormatter = new SimpleDateFormat("EEE MMM dd HH" + getColon() + "mm" + getColon() + "ss ZZZ yyyy"); public static final String defaultloggerName = TextsProvider.ITW + " file-logger";