ARTEMIS-1150 fixing logging with spaces on windows service

This commit is contained in:
Clebert Suconic 2017-05-05 16:40:51 -04:00
parent a915e8b904
commit 7c96ab6bd7
4 changed files with 14 additions and 5 deletions

View File

@ -589,6 +589,7 @@ public class Create extends InputAbstract {
filters.put("${artemis.home}", path(getHome().toString()));
filters.put("${artemis.instance}", path(directory));
filters.put("${artemis.instance.uri}", directory.toURI().toString());
filters.put("${artemis.instance.uri.windows}", directory.toURI().toString().replaceAll("%", "%%"));
filters.put("${artemis.instance.name}", directory.getName());
filters.put("${java.home}", path(System.getProperty("java.home")));

View File

@ -24,6 +24,7 @@
<env name="ARTEMIS_HOME" value="${artemis.home}"/>
<env name="ARTEMIS_INSTANCE" value="${artemis.instance}"/>
<env name="ARTEMIS_INSTANCE_URI" value="${artemis.instance.uri}"/>
<logpath>${artemis.instance}\log</logpath>
<logmode>roll</logmode>
@ -43,12 +44,19 @@
<argument>-Dartemis.remoting.hornetq.port=5446</argument>
-->
<!-- uncomment this if you want to connect jconsole to connect
<argument>-Dcom.sun.management.jmxremote</argument>
<argument>-Dcom.sun.management.jmxremote.port=8086</argument>
<argument>-Dcom.sun.management.jmxremote.ssl=false</argument>
<argument>-Dcom.sun.management.jmxremote.authenticate=false</argument>
-->
<argument>-classpath</argument>
<argument>%ARTEMIS_HOME%\lib\artemis-boot.jar</argument>
<argument>-Dartemis.home=%ARTEMIS_HOME%</argument>
<argument>-Dartemis.instance=%ARTEMIS_INSTANCE%</argument>
<argument>-Djava.util.logging.manager=org.jboss.logmanager.LogManager</argument>
<argument>-Dlogging.configuration=file:%ARTEMIS_INSTANCE%\etc\logging.properties</argument>
<argument>-Dlogging.configuration=%ARTEMIS_INSTANCE_URI%/etc/logging.properties</argument>
<argument>-Djava.security.auth.login.config=%ARTEMIS_INSTANCE%\etc\login.config</argument>

View File

@ -47,14 +47,14 @@ echo.
:RUN_JAVA
rem "Load Profile Config"
call %ARTEMIS_INSTANCE%\etc\artemis.profile.cmd %*
rem "Set Defaults."
set ARTEMIS_LOGGING_CONF=%ARTEMIS_INSTANCE_URI%/etc/logging.properties
set ARTEMIS_DATA_DIR=%ARTEMIS_INSTANCE%\data
set ARTEMIS_LOG_MANAGER=org.jboss.logmanager.LogManager
rem "Load Profile Config"
call %ARTEMIS_INSTANCE%\etc\artemis.profile.cmd %*
rem "Create full JVM Args"
set JVM_ARGS=%JAVA_ARGS%
if not "%ARTEMIS_CLUSTER_PROPS%"=="" set JVM_ARGS=%JVM_ARGS% %ARTEMIS_CLUSTER_PROPS%

View File

@ -22,7 +22,7 @@ set ARTEMIS_INSTANCE="${artemis.instance}"
rem The logging config will need an URI
rem this will be encoded in case you use spaces or special characters
rem on your directory structure
set ARTEMIS_INSTANCE_URI="${artemis.instance.uri}"
set ARTEMIS_INSTANCE_URI="${artemis.instance.uri.windows}"
rem Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
rem set ARTEMIS_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446