]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.logging/src/org/simantics/logging/DBAndMetadataLogProvider.java
Added LoggingUtils/archiveLogs SCL function.
[simantics/platform.git] / bundles / org.simantics.logging / src / org / simantics / logging / DBAndMetadataLogProvider.java
index 79e10dbef85b675783e8f68c86077e020772f267..e24a66fc452faaf17a88f8d52bff22bc941f1aa8 100644 (file)
@@ -1,5 +1,6 @@
 package org.simantics.logging;
 
+import java.io.File;
 import java.lang.reflect.Field;
 import java.net.URL;
 import java.nio.file.Path;
@@ -45,8 +46,8 @@ public class DBAndMetadataLogProvider implements LogProvider {
         if (prop != null) {
             try {
                 URL url = new URL(prop);
-                if ("file".equals(url .getProtocol())) {
-                    Path path = Paths.get(url.toURI());
+                if ("file".equals(url.getProtocol())) {
+                    Path path = Paths.get(new File(url.getFile()).getAbsolutePath());
                     return path.resolve(".metadata").resolve(".log");
                 } else {
                     LOGGER.warn("Unsupported protocol {}", url);