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/05/16 15:28:39 UTC
[activemq-artemis] 02/02: tweak variables for simplicity, make debug env variable align better with processor name/purpose
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 10a4bc1e025060a8f67393ebf1107b423e29982d
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Mon May 16 16:27:33 2022 +0100
tweak variables for simplicity, make debug env variable align better with processor name/purpose
---
.../artemis/logprocessor/LogProcessor.java | 23 +++++++++-------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
index d4b4f5c119..d9aacf6491 100644
--- a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
+++ b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
@@ -47,25 +47,20 @@ public class LogProcessor extends AbstractProcessor {
private static final boolean DEBUG;
static {
- boolean activeResult;
- {
- try {
- String activeEnv = System.getenv("ARTEMIS_PROCESSOR_DEBUG");
- if (activeEnv != null) {
- activeResult = Boolean.parseBoolean(activeEnv);
- } else {
- activeResult = false;
- }
- } catch (Exception e) {
- e.printStackTrace();
- activeResult = false;
+ boolean debugResult = false;
+ try {
+ String debugEnvVariable = System.getenv("ARTEMIS_LOG_PROCESSOR_DEBUG");
+ if (debugEnvVariable != null) {
+ debugResult = Boolean.parseBoolean(debugEnvVariable);
}
+ } catch (Exception e) {
+ e.printStackTrace();
}
- DEBUG = activeResult;
+ DEBUG = debugResult;
}
/**
- * define a system variable named ARTEMIS_PROCESSOR_DEBUG=true in order to see debug output
+ * define a system variable ARTEMIS_LOG_PROCESSOR_DEBUG=true in order to see debug output
*/
protected static void debug(String debugMessage) {
if (DEBUG) {