karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [karaf] branch master updated: [KARAF-6180] Pax-exam issues with logging config
Date Fri, 01 Mar 2019 15:02:39 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new dbebcc6  [KARAF-6180] Pax-exam issues with logging config
dbebcc6 is described below

commit dbebcc6bbfba743431d55e96043f0ba7dcec5810
Author: Guillaume Nodet <gnodet@gmail.com>
AuthorDate: Fri Mar 1 16:02:24 2019 +0100

    [KARAF-6180] Pax-exam issues with logging config
---
 .../java/org/apache/karaf/main/ConfigProperties.java     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/main/src/main/java/org/apache/karaf/main/ConfigProperties.java b/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
index f3b35e5..cb186d7 100644
--- a/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
+++ b/main/src/main/java/org/apache/karaf/main/ConfigProperties.java
@@ -85,6 +85,18 @@ public class ConfigProperties {
      */
     public static final String ENV_KARAF_ETC = "KARAF_ETC";
     /**
+     * The system property for specifying the Karaf log directory. The log directory
+     * holds the log files.
+     */
+    public static final String PROP_KARAF_LOG = "karaf.log";
+
+    public static final String PROP_KARAF_LOG_URI = "karaf.log.uri";
+    /**
+     * The environment variable for specifying the Karaf log directory. The log directory
+     * holds the log files.
+     */
+    public static final String ENV_KARAF_LOG = "KARAF_LOG";
+    /**
      * The system property for specifying the Karaf data directory. The data directory
      * holds the bundles data and cache for a Karaf instance.
      */
@@ -171,6 +183,7 @@ public class ConfigProperties {
     File karafBase;
     File karafData;
     File karafEtc;
+    File karafLog;
     File karafInstances;
     
     Properties props;
@@ -203,6 +216,7 @@ public class ConfigProperties {
         this.karafBase = Utils.getKarafDirectory(PROP_KARAF_BASE, ENV_KARAF_BASE, karafHome,
false, true);
         this.karafData = Utils.getKarafDirectory(PROP_KARAF_DATA, ENV_KARAF_DATA, new File(karafBase,
"data"), true, true);
         this.karafEtc = Utils.getKarafDirectory(PROP_KARAF_ETC, ENV_KARAF_ETC, new File(karafBase,
"etc"), true, true);
+        this.karafLog = Utils.getKarafDirectory(PROP_KARAF_LOG, ENV_KARAF_LOG, new File(karafData,
"log"), true, true);
 
         this.karafInstances = Utils.getKarafDirectory(PROP_KARAF_INSTANCES, ENV_KARAF_INSTANCES,
new File(karafHome, "instances"), false, false);
 
@@ -214,12 +228,14 @@ public class ConfigProperties {
         System.setProperty(PROP_KARAF_BASE, karafBase.getPath());
         System.setProperty(PROP_KARAF_DATA, karafData.getPath());
         System.setProperty(PROP_KARAF_ETC, karafEtc.getPath());
+        System.setProperty(PROP_KARAF_LOG, karafLog.getPath());
         System.setProperty(PROP_KARAF_INSTANCES, karafInstances.getPath());
 
         System.setProperty(PROP_KARAF_HOME_URI, karafHome.toURI().toASCIIString());
         System.setProperty(PROP_KARAF_BASE_URI, karafBase.toURI().toASCIIString());
         System.setProperty(PROP_KARAF_DATA_URI, karafData.toURI().toASCIIString());
         System.setProperty(PROP_KARAF_ETC_URI, karafEtc.toURI().toASCIIString());
+        System.setProperty(PROP_KARAF_LOG_URI, karafLog.toURI().toASCIIString());
         System.setProperty(PROP_KARAF_INSTANCES_URI, karafInstances.toURI().toASCIIString());
 
         if (!karafEtc.exists()) {


Mime
View raw message