You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2022/09/13 15:00:16 UTC
[activemq-artemis] branch new-logging updated (fe74837bf1 -> 6bee244d8f)
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a change to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
from fe74837bf1 repeat removal to undo compensating commits
new 13159ee1b9 try out simplifying to use auto-detected log4j2.properties config file
new 76825182fe add notes
new 6bee244d8f remove arg that isnt being used anymore
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
TODO-new-logging.txt | 8 +++++-
.../activemq/artemis/cli/commands/Create.java | 4 +--
.../activemq/artemis/cli/commands/bin/artemis | 4 ---
.../artemis/cli/commands/bin/artemis-service.xml | 2 --
.../activemq/artemis/cli/commands/bin/artemis.cmd | 4 ---
...{log4j2-config.properties => log4j2.properties} | 0
.../activemq/cli/test/StreamClassPathTest.java | 2 +-
.../activemq/artemis/utils/SpawnedVMSupport.java | 31 +++++-----------------
docs/user-manual/en/logging.md | 6 ++---
docs/user-manual/en/using-server.md | 2 +-
docs/user-manual/en/versions.md | 2 +-
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
.../src/main/resources/containerService/artemis | 4 ---
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
.../tests/integration/client/JournalCrashTest.java | 2 +-
.../cluster/FileLockNodeManagerTest.java | 2 +-
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
...{log4j2-config.properties => log4j2.properties} | 0
25 files changed, 24 insertions(+), 49 deletions(-)
rename artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/{log4j2-config.properties => log4j2.properties} (100%)
rename examples/features/standard/security-keycloak/src/main/resources/activemq/server0/{log4j2-config.properties => log4j2.properties} (100%)
rename examples/features/standard/security-ldap/src/main/resources/activemq/server0/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/smoke-tests/src/main/resources/servers/audit-logging-amqp-mutual-ssl/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/smoke-tests/src/main/resources/servers/audit-logging/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/smoke-tests/src/main/resources/servers/audit-logging2/{log4j2-config.properties => log4j2.properties} (100%)
rename tests/smoke-tests/src/main/resources/servers/nettynative/{log4j2-config.properties => log4j2.properties} (100%)
[activemq-artemis] 02/03: add notes
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 76825182fe48fa778dfc61a5261050d8936ee4e0
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Sep 13 12:56:26 2022 +0100
add notes
---
TODO-new-logging.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/TODO-new-logging.txt b/TODO-new-logging.txt
index 94ab19fac5..1c54f4371d 100644
--- a/TODO-new-logging.txt
+++ b/TODO-new-logging.txt
@@ -4,3 +4,10 @@ TODOs not explicitly noted in the code itself already:
- Restore the Travis config file
- Delete the old DELETE-ME-logging.properties and DELETE-ME-tests-logging.properties files once all needed comparisons during old test etc config replacements are done.
- Decide what if anything should be done around the removed logging config reload bits (Log4J2 enables reload itself, via its own config...or updates via management)
+- consider module name of annotation processor, currently artemis-log-processor...perhaps artemis-annotation-processor?
+- Consider names of annotations + packages and their alignment:
+ -- org.apache.activemq.artemis.logprocessor.annotation.GetLogger;
+ -- org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
+ -- org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+ -- org.apache.activemq.artemis.logprocessor.annotation.Message;
+ -- org.apache.activemq.artemis.logs.BundleFactory;
[activemq-artemis] 01/03: try out simplifying to use auto-detected log4j2.properties config file
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 13159ee1b9cac52025276688e2fc9fff793c2b7e
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Sep 13 12:31:30 2022 +0100
try out simplifying to use auto-detected log4j2.properties config file
---
TODO-new-logging.txt | 1 -
.../main/java/org/apache/activemq/artemis/cli/commands/Create.java | 4 ++--
.../resources/org/apache/activemq/artemis/cli/commands/bin/artemis | 4 ----
.../apache/activemq/artemis/cli/commands/bin/artemis-service.xml | 2 --
.../org/apache/activemq/artemis/cli/commands/bin/artemis.cmd | 4 ----
.../commands/etc/{log4j2-config.properties => log4j2.properties} | 0
.../test/java/org/apache/activemq/cli/test/StreamClassPathTest.java | 2 +-
docs/user-manual/en/logging.md | 6 +++---
docs/user-manual/en/using-server.md | 2 +-
docs/user-manual/en/versions.md | 2 +-
.../server0/{log4j2-config.properties => log4j2.properties} | 0
.../server0/{log4j2-config.properties => log4j2.properties} | 0
tests/e2e-tests/src/main/resources/containerService/artemis | 4 ----
.../serverA/{log4j2-config.properties => log4j2.properties} | 0
.../serverB/{log4j2-config.properties => log4j2.properties} | 0
.../serverA/{log4j2-config.properties => log4j2.properties} | 0
.../serverB/{log4j2-config.properties => log4j2.properties} | 0
.../serverRoot/{log4j2-config.properties => log4j2.properties} | 0
.../{log4j2-config.properties => log4j2.properties} | 0
.../audit-logging/{log4j2-config.properties => log4j2.properties} | 0
.../audit-logging2/{log4j2-config.properties => log4j2.properties} | 0
.../nettynative/{log4j2-config.properties => log4j2.properties} | 0
22 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/TODO-new-logging.txt b/TODO-new-logging.txt
index d98ba62b9a..94ab19fac5 100644
--- a/TODO-new-logging.txt
+++ b/TODO-new-logging.txt
@@ -4,4 +4,3 @@ TODOs not explicitly noted in the code itself already:
- Restore the Travis config file
- Delete the old DELETE-ME-logging.properties and DELETE-ME-tests-logging.properties files once all needed comparisons during old test etc config replacements are done.
- Decide what if anything should be done around the removed logging config reload bits (Log4J2 enables reload itself, via its own config...or updates via management)
-- Decide if we should use the auto-detected log4j2.properties config filename instead of -Dlog4j2.configurationFile=log4j2-config.properties specified file.
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 582c3036b7..c0cc63b722 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -81,7 +81,7 @@ public class Create extends InputAbstract {
public static final String BIN_ARTEMIS = "bin/artemis";
public static final String BIN_ARTEMIS_SERVICE = "bin/artemis-service";
public static final String ETC_ARTEMIS_PROFILE = "artemis.profile";
- public static final String ETC_LOGGING_PROPERTIES = "log4j2-config.properties";
+ public static final String ETC_LOG4J2_PROPERTIES = "log4j2.properties";
public static final String ETC_BOOTSTRAP_XML = "bootstrap.xml";
public static final String ETC_MANAGEMENT_XML = "management.xml";
public static final String ETC_BROKER_XML = "broker.xml";
@@ -822,7 +822,7 @@ public class Create extends InputAbstract {
writeEtc(ETC_ARTEMIS_PROFILE, etcFolder, filters, true);
}
- writeEtc(ETC_LOGGING_PROPERTIES, etcFolder, null, false);
+ writeEtc(ETC_LOG4J2_PROPERTIES, etcFolder, null, false);
if (noWeb) {
filters.put("${bootstrap-web-settings}", "");
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
index 42f093561e..5ee4f1e3a0 100755
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis
@@ -50,9 +50,6 @@ HAWTIO_ROLE="NO_HAWTIO_ROLE"
ARTEMIS_INSTANCE_ETC='${artemis.instance.etc}'
. "$ARTEMIS_INSTANCE_ETC/artemis.profile"
-# Set Defaults Properties
-ARTEMIS_LOGGING_CONF="$ARTEMIS_INSTANCE_ETC_URI/log4j2-config.properties"
-
CLASSPATH="$ARTEMIS_HOME/lib/artemis-boot.jar"
@@ -115,7 +112,6 @@ exec "$JAVACMD" \
-Djava.io.tmpdir="$ARTEMIS_INSTANCE/tmp" \
-Ddata.dir="$ARTEMIS_DATA_DIR" \
-Dartemis.instance.etc="$ARTEMIS_INSTANCE_ETC" \
- -Dlog4j2.configurationFile="$ARTEMIS_LOGGING_CONF" \
-Dartemis.default.sensitive.string.codec.key="$ARTEMIS_DEFAULT_SENSITIVE_STRING_CODEC_KEY" \
$DEBUG_ARGS \
org.apache.activemq.artemis.boot.Artemis "$@"
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
index fe31529f1b..b6b08d3f06 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
@@ -50,7 +50,6 @@
<startargument>-Dartemis.instance=%ARTEMIS_INSTANCE%</startargument>
<startargument>-Ddata.dir=%ARTEMIS_DATA_DIR%</startargument>
<startargument>-Dartemis.instance.etc=%ARTEMIS_INSTANCE_ETC%</startargument>
- <startargument>-Dlog4j2.configurationFile=%ARTEMIS_INSTANCE_ETC_URI%/log4j2-config.properties</startargument>
<startargument>-Djava.security.auth.login.config=%ARTEMIS_INSTANCE_ETC%\login.config</startargument>
<startargument>-Dhawtio.disableProxy=true</startargument>
<startargument>-Dhawtio.realm=activemq</startargument>
@@ -78,7 +77,6 @@
<stopargument>-Dartemis.instance=%ARTEMIS_INSTANCE%</stopargument>
<stopargument>-Ddata.dir=%ARTEMIS_DATA_DIR%</stopargument>
<stopargument>-Dartemis.instance.etc="%ARTEMIS_INSTANCE_ETC%"</stopargument>
- <stopargument>-Dlog4j2.configurationFile=%ARTEMIS_INSTANCE_ETC_URI%/log4j2-config.properties</stopargument>
<stopargument>org.apache.activemq.artemis.boot.Artemis</stopargument>
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
index a403ffaa3a..ed7ea68955 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
@@ -48,9 +48,6 @@ rem "Load Profile Config"
set ARTEMIS_INSTANCE_ETC="${artemis.instance.etc}"
call %ARTEMIS_INSTANCE_ETC%\artemis.profile.cmd %*
-rem "Set Defaults."
-set ARTEMIS_LOGGING_CONF=%ARTEMIS_INSTANCE_ETC_URI%/log4j2-config.properties
-
if not exist "%ARTEMIS_OOME_DUMP%" goto NO_ARTEMIS_OOME_DUMP
rem "Backup the last OOME heap dump"
move /Y "%ARTEMIS_OOME_DUMP%" "%ARTEMIS_OOME_DUMP%.bkp"
@@ -65,7 +62,6 @@ set JVM_ARGS=%JVM_ARGS% -Dartemis.home=%ARTEMIS_HOME%
set JVM_ARGS=%JVM_ARGS% -Dartemis.instance=%ARTEMIS_INSTANCE%
set JVM_ARGS=%JVM_ARGS% -Ddata.dir=%ARTEMIS_DATA_DIR%
set JVM_ARGS=%JVM_ARGS% -Dartemis.instance.etc=%ARTEMIS_INSTANCE_ETC%
-set JVM_ARGS=%JVM_ARGS% -Dlog4j2.configurationFile=%ARTEMIS_LOGGING_CONF%
set JVM_ARGS=%JVM_ARGS% -Dartemis.default.sensitive.string.codec.key=%ARTEMIS_DEFAULT_SENSITIVE_STRING_CODEC_KEY%
if not "%DEBUG_ARGS%"=="" set JVM_ARGS=%JVM_ARGS% %DEBUG_ARGS%
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/log4j2-config.properties b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/log4j2.properties
similarity index 100%
rename from artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/log4j2-config.properties
rename to artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/log4j2.properties
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/StreamClassPathTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/StreamClassPathTest.java
index 4dd273b344..4bc1d1970c 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/StreamClassPathTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/StreamClassPathTest.java
@@ -39,7 +39,7 @@ public class StreamClassPathTest {
testStream(Create.class, Create.BIN_ARTEMIS);
testStream(Create.class, Create.BIN_ARTEMIS_SERVICE);
testStream(Create.class, "etc/" + Create.ETC_ARTEMIS_PROFILE);
- testStream(Create.class, "etc/" + Create.ETC_LOGGING_PROPERTIES);
+ testStream(Create.class, "etc/" + Create.ETC_LOG4J2_PROPERTIES);
testStream(Create.class, "etc/" + Create.ETC_BOOTSTRAP_XML);
testStream(Create.class, "etc/" + Create.ETC_MANAGEMENT_XML);
testStream(Create.class, "etc/" + Create.ETC_BROKER_XML);
diff --git a/docs/user-manual/en/logging.md b/docs/user-manual/en/logging.md
index 5b1acbc33c..7faf9a3912 100644
--- a/docs/user-manual/en/logging.md
+++ b/docs/user-manual/en/logging.md
@@ -2,7 +2,7 @@
Apache ActiveMQ Artemis uses the [SLF4J](https://www.slf4j.org/) logging facade for logging,
with the broker assembly providing [Log4J 2](https://logging.apache.org/log4j/2.x/manual/)
-as the logging implementation. This is configurable via the `log4j2-config.properties` file
+as the logging implementation. This is configurable via the `log4j2.properties` file
found in the broker instance `etc` directory, which is configured by default to log to
both the console and to a file.
@@ -61,7 +61,7 @@ called `log4j2.properties` which will be picked up automatically.
Alternatively, use of a specific configuration file can be configured via system
property `log4j2.configurationFile`, e.g.:
```
--Dlog4j2.configurationFile=file:///path/to/log4j2-config.properties
+-Dlog4j2.configurationFile=file:///path/to/custom-log4j2-config.properties
```
The following is an example `log4j2.properties` for a client
@@ -112,7 +112,7 @@ different types of broker events, these are:
> the performance impact is "too much" will depend on your use-case.
These three audit loggers are disabled by default in the broker
-`log4j2-config.properties` configuration file:
+`log4j2.properties` configuration file:
```
...
diff --git a/docs/user-manual/en/using-server.md b/docs/user-manual/en/using-server.md
index 17e7707a22..08306054cc 100644
--- a/docs/user-manual/en/using-server.md
+++ b/docs/user-manual/en/using-server.md
@@ -441,7 +441,7 @@ further for additional details as appropriate.
diverts, clustering; [full reference](configuration-index.md).
- `jolokia-access.xml` - [security for Jolokia](https://jolokia.org/reference/html/security.html),
specifically Cross-Origin Resource Sharing (CORS)
- - `log4j2-config.properties` - [logging config](logging.md) like levels, log files
+ - `log4j2.properties` - [logging config](logging.md) like levels, log files
locations, etc.
- `login.config` - standard Java configuration for JAAS [security](security.md)
- `management.xml` - remote connectivity and [security for JMX MBeans](management.md#role-based-authorisation-for-jmx)
diff --git a/docs/user-manual/en/versions.md b/docs/user-manual/en/versions.md
index b078a9737e..f327d24763 100644
--- a/docs/user-manual/en/versions.md
+++ b/docs/user-manual/en/versions.md
@@ -17,7 +17,7 @@ Highlights:
#### Upgrading from older versions
1. <instance>/etc/logging.properties removal
- 2. <instance>/etc/log4j2-config.properties creation
+ 2. <instance>/etc/log4j2.properties creation
3. Related script or profile changes
## 2.25.0
diff --git a/examples/features/standard/security-keycloak/src/main/resources/activemq/server0/log4j2-config.properties b/examples/features/standard/security-keycloak/src/main/resources/activemq/server0/log4j2.properties
similarity index 100%
rename from examples/features/standard/security-keycloak/src/main/resources/activemq/server0/log4j2-config.properties
rename to examples/features/standard/security-keycloak/src/main/resources/activemq/server0/log4j2.properties
diff --git a/examples/features/standard/security-ldap/src/main/resources/activemq/server0/log4j2-config.properties b/examples/features/standard/security-ldap/src/main/resources/activemq/server0/log4j2.properties
similarity index 100%
rename from examples/features/standard/security-ldap/src/main/resources/activemq/server0/log4j2-config.properties
rename to examples/features/standard/security-ldap/src/main/resources/activemq/server0/log4j2.properties
diff --git a/tests/e2e-tests/src/main/resources/containerService/artemis b/tests/e2e-tests/src/main/resources/containerService/artemis
index ea6992bf24..4ab71c12f6 100755
--- a/tests/e2e-tests/src/main/resources/containerService/artemis
+++ b/tests/e2e-tests/src/main/resources/containerService/artemis
@@ -50,9 +50,6 @@ HAWTIO_ROLE="NO_HAWTIO_ROLE"
ARTEMIS_INSTANCE_ETC='/var/lib/artemis-instance/etc'
. "$ARTEMIS_INSTANCE_ETC/artemis.profile"
-# Set Defaults Properties
-ARTEMIS_LOGGING_CONF="$ARTEMIS_INSTANCE_ETC_URI/log4j2-config.properties"
-
CLASSPATH="$ARTEMIS_HOME/lib/artemis-boot.jar"
@@ -115,7 +112,6 @@ exec "$JAVACMD" \
-Djava.io.tmpdir="$ARTEMIS_INSTANCE/tmp" \
-Ddata.dir="$ARTEMIS_DATA_DIR" \
-Dartemis.instance.etc="$ARTEMIS_INSTANCE_ETC" \
- -Dlog4j2.configurationFile="$ARTEMIS_LOGGING_CONF" \
-Dartemis.default.sensitive.string.codec.key="$ARTEMIS_DEFAULT_SENSITIVE_STRING_CODEC_KEY" \
$DEBUG_ARGS \
org.apache.activemq.artemis.boot.Artemis "$@"
diff --git a/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/log4j2-config.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/log4j2.properties
similarity index 100%
rename from tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/log4j2-config.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/log4j2.properties
diff --git a/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/log4j2-config.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/log4j2.properties
similarity index 100%
rename from tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/log4j2-config.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/log4j2.properties
diff --git a/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/log4j2-config.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/log4j2.properties
similarity index 100%
rename from tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/log4j2-config.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/log4j2.properties
diff --git a/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/log4j2-config.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/log4j2.properties
similarity index 100%
rename from tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/log4j2-config.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/log4j2.properties
diff --git a/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/log4j2-config.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/log4j2.properties
similarity index 100%
rename from tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/log4j2-config.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/log4j2.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/audit-logging-amqp-mutual-ssl/log4j2-config.properties b/tests/smoke-tests/src/main/resources/servers/audit-logging-amqp-mutual-ssl/log4j2.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/audit-logging-amqp-mutual-ssl/log4j2-config.properties
rename to tests/smoke-tests/src/main/resources/servers/audit-logging-amqp-mutual-ssl/log4j2.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/audit-logging/log4j2-config.properties b/tests/smoke-tests/src/main/resources/servers/audit-logging/log4j2.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/audit-logging/log4j2-config.properties
rename to tests/smoke-tests/src/main/resources/servers/audit-logging/log4j2.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/audit-logging2/log4j2-config.properties b/tests/smoke-tests/src/main/resources/servers/audit-logging2/log4j2.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/audit-logging2/log4j2-config.properties
rename to tests/smoke-tests/src/main/resources/servers/audit-logging2/log4j2.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/nettynative/log4j2-config.properties b/tests/smoke-tests/src/main/resources/servers/nettynative/log4j2.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/nettynative/log4j2-config.properties
rename to tests/smoke-tests/src/main/resources/servers/nettynative/log4j2.properties
[activemq-artemis] 03/03: remove arg that isnt being used anymore
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 6bee244d8ff386b2d694092f01b6541c1b00a196
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Sep 13 13:22:17 2022 +0100
remove arg that isnt being used anymore
---
.../activemq/artemis/utils/SpawnedVMSupport.java | 31 +++++-----------------
.../tests/integration/client/JournalCrashTest.java | 2 +-
.../cluster/FileLockNodeManagerTest.java | 2 +-
3 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
index 397654f47c..164d1d5da0 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
@@ -27,15 +27,10 @@ import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
public class SpawnedVMSupport {
static ConcurrentHashMap<Process, String> startedProcesses = null;
- private static final Logger log = LoggerFactory.getLogger(SpawnedVMSupport.class);
-
public static Process spawnVM(final String className, final String... args) throws Exception {
return SpawnedVMSupport.spawnVM(className, new String[0], true, args);
}
@@ -60,7 +55,7 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final String... args) throws Exception {
- return SpawnedVMSupport.spawnVM(className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args);
+ return SpawnedVMSupport.spawnVM(className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args);
}
public static Process spawnVM(final String classpath,
@@ -68,7 +63,7 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final String... args) throws Exception {
- return SpawnedVMSupport.spawnVM(classpath, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args);
+ return SpawnedVMSupport.spawnVM(classpath, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args);
}
public static Process spawnVMWithLogMacher(String wordMatch,
@@ -77,7 +72,7 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final String... args) throws Exception {
- return SpawnedVMSupport.spawnVM(wordMatch, runnable, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args);
+ return SpawnedVMSupport.spawnVM(wordMatch, runnable, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args);
}
public static Process spawnVM(final String className,
@@ -86,9 +81,8 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final boolean logErrorOutput,
- final boolean useLogging,
final String... args) throws Exception {
- return spawnVM(null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args);
+ return spawnVM(null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args);
}
public static Process spawnVM(final String classPath,
@@ -98,9 +92,8 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final boolean logErrorOutput,
- final boolean useLogging,
final String... args) throws Exception {
- return spawnVM(classPath, null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args);
+ return spawnVM(classPath, null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args);
}
public static Process spawnVM(final String wordMatch,
@@ -111,9 +104,8 @@ public class SpawnedVMSupport {
final String[] vmargs,
final boolean logOutput,
final boolean logErrorOutput,
- final boolean useLogging,
final String... args) throws Exception {
- return spawnVM(getClassPath(), wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args);
+ return spawnVM(getClassPath(), wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args);
}
@@ -126,9 +118,8 @@ public class SpawnedVMSupport {
String[] vmargs,
boolean logOutput,
boolean logErrorOutput,
- boolean useLogging,
String... args) throws IOException, ClassNotFoundException {
- return spawnVM(classPath, wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, -1, args);
+ return spawnVM(classPath, wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, -1, args);
}
public static String getClassPath() {
@@ -171,7 +162,6 @@ public class SpawnedVMSupport {
* @param vmargs
* @param logOutput
* @param logErrorOutput
- * @param useLogging
* @param debugPort if <=0 it means no debug
* @param args
* @return
@@ -187,7 +177,6 @@ public class SpawnedVMSupport {
String[] vmargs,
boolean logOutput,
boolean logErrorOutput,
- boolean useLogging,
long debugPort,
String... args) throws IOException, ClassNotFoundException {
final String javaPath = Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath().toString();
@@ -212,12 +201,6 @@ public class SpawnedVMSupport {
}
}
- // The logs will be huge if you don't set this
- if (useLogging) {
- // TODO: visible uses appear to set this true, but we no longer do anything with it
- // as we dont use the logging.configuration property anymore..remove method arg?
- }
-
commandList.add("-Djava.io.tmpdir=" + System.getProperty("java.io.tmpdir", "./tmp"));
commandList.add("-Djava.library.path=" + System.getProperty("java.library.path", "./native/bin"));
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
index 944fff8b28..334b319f56 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
@@ -165,7 +165,7 @@ public class JournalCrashTest extends SpawnedTestBase {
*/
private void runExternalProcess(final String tempDir, final int start, final int end) throws Exception {
System.err.println("running external process...");
- Process process = SpawnedVMSupport.spawnVM(this.getClass().getCanonicalName(), "-Xms128m", "-Xmx128m", new String[]{}, true, true, true, tempDir, Integer.toString(start), Integer.toString(end));
+ Process process = SpawnedVMSupport.spawnVM(this.getClass().getCanonicalName(), "-Xms128m", "-Xmx128m", new String[]{}, true, true, tempDir, Integer.toString(start), Integer.toString(end));
Assert.assertEquals(100, process.waitFor());
}
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java
index be2dc7dbd4..3c30e4a276 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java
@@ -34,7 +34,7 @@ public class FileLockNodeManagerTest extends NodeManagerTest {
final String[] args = new String[action.works() + 1];
args[0] = getTemporaryDir();
action.getWork(args, 1);
- Process p = SpawnedVMSupport.spawnVM(this.getClass().getName(), "-Xms50m", "-Xmx512m", new String[0], true, true, true, args);
+ Process p = SpawnedVMSupport.spawnVM(this.getClass().getName(), "-Xms50m", "-Xmx512m", new String[0], true, true, args);
processes.add(p);
}
for (Process process : processes) {