1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-22 15:58:52 -05:00

Support for adding timestamps to logging output via -Dnet.filebot.logging.time=true

This commit is contained in:
Reinhard Pointner 2019-01-16 18:56:18 +07:00
parent 4f26f4ec3d
commit 68af78f34e

View File

@ -129,7 +129,7 @@ index b8e7f8b2..005f702f 100644
-java -Dapplication.deployment=deb --module-path "$MODULE_PATH" --add-modules ALL-MODULE-PATH -Djna.boot.library.name=jnidispatch.system -Dnet.filebot.Archive.extractor=SevenZipExecutable @{java.application.options} @{linux.application.options} @{linux.desktop.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"
+java -Dapplication.deployment=deb -Djna.boot.library.name=jnidispatch.system -Dnet.filebot.Archive.extractor=SevenZipExecutable @{java.application.options} @{linux.application.options} @{linux.desktop.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"
diff --git a/ivy.xml b/ivy.xml
index b363fd05..fc0895ef 100644
index fc724d52..2b8170a7 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -25,7 +25,7 @@
@ -141,6 +141,27 @@ index b363fd05..fc0895ef 100644
<dependency rev="3.0.0" org="com.googlecode.lanterna" name="lanterna" />
<dependency rev="2.11.0" org="com.drewnoakes" name="metadata-extractor" />
<dependency rev="1.59" org="org.bouncycastle" name="bcprov-jdk15on" />
diff --git a/source/net/filebot/Logging.java b/source/net/filebot/Logging.java
index af5319e6..b2d5795f 100644
--- a/source/net/filebot/Logging.java
+++ b/source/net/filebot/Logging.java
@@ -12,6 +12,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.channels.FileChannel;
import java.nio.file.StandardOpenOption;
+import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
@@ -155,7 +156,7 @@ public final class Logging {
// ADD TIMESTAMP
if (dateTimeFormatter != null) {
- dateTimeFormatter.formatTo(record.getInstant(), buffer);
+ dateTimeFormatter.formatTo(Instant.ofEpochMilli(record.getMillis()), buffer);
}
// BEGIN COLOR
diff --git a/source/net/filebot/ResourceManager.java b/source/net/filebot/ResourceManager.java
index 7e393cac..5eb3dadd 100644
--- a/source/net/filebot/ResourceManager.java