karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [karaf] 01/02: Add karaf.log support in instances
Date Tue, 11 Dec 2018 07:02:18 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git

commit 72eb6e47451e1c44812619888fce354ac44d6fff
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
AuthorDate: Tue Dec 11 08:00:53 2018 +0100

    Add karaf.log support in instances
---
 .../org/apache/karaf/instance/core/internal/InstanceServiceImpl.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index 487f194..0a15e73 100644
--- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -540,6 +540,7 @@ public class InstanceServiceImpl implements InstanceService {
                 + " -Dkaraf.base=\"" + new File(location).getCanonicalPath() + "\""
                 + " -Dkaraf.data=\"" + new File(new File(location).getCanonicalPath(), "data")
+ "\""
                 + " -Dkaraf.etc=\"" + new File(new File(location).getCanonicalPath(), "etc")
+ "\""
+                + " -Dkaraf.log=\"" + new File(new File(new File(location).getCanonicalFile(),
"data"), "log") + "\""
                 + " -Djava.io.tmpdir=\"" + new File(new File(location).getCanonicalPath(),
"data" + File.separator + "tmp") + "\""
                 + " -Dkaraf.startLocalConsole=false"
                 + " -Dkaraf.startRemoteShell=true"
@@ -617,6 +618,7 @@ public class InstanceServiceImpl implements InstanceService {
                         + " -Dkaraf.base=\"" + new File(location).getCanonicalPath() + "\""
                         + " -Dkaraf.data=\"" + new File(new File(location).getCanonicalPath(),
"data") + "\""
                         + " -Dkaraf.etc=\"" + new File(new File(location).getCanonicalPath(),
"etc") + "\""
+                        + " -Dkaraf.log=\"" + new File(new File(new File(location).getCanonicalFile(),
"data"), "log") + "\""
                         + " -Dkaraf.instances=\"" + System.getProperty("karaf.instances")
+ "\""
                         + " -classpath \"" + classpath.toString() + "\""
                         + " " + Execute.class.getName()
@@ -829,6 +831,7 @@ public class InstanceServiceImpl implements InstanceService {
             props.put("karaf.home", System.getProperty("karaf.home"));
             props.put("karaf.data", new File(new File(instance.loc), "data").getCanonicalPath());
             props.put("karaf.etc", new File(new File(instance.loc), "etc").getCanonicalPath());
+            props.put("karaf.log", new File(new File(new File(instance.loc), "data"), "log").getCanonicalPath());
             InterpolationHelper.performSubstitution(props, null, true, false, true);
             int port = Integer.parseInt(props.getProperty(KARAF_SHUTDOWN_PORT, "0"));
             String host = props.getProperty(KARAF_SHUTDOWN_HOST, "localhost");


Mime
View raw message