Skip to content

Commit

Permalink
Dump the initialization's environment
Browse files Browse the repository at this point in the history
  • Loading branch information
schulz2 committed Mar 25, 2019
1 parent ca54e65 commit ecdffef
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
package com.ibm.streamsx.messaging.jms;

import java.net.MalformedURLException;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;

import com.ibm.streams.operator.OperatorContext;
Expand All @@ -21,6 +23,18 @@ public static void setupClassPaths(OperatorContext context) {
tracer.log(TraceLevel.TRACE, "Setting up classpath"); //$NON-NLS-1$

boolean classpathSet = false;


// Dump the provided environment
Map<String,String> sysEnvMap = System.getenv();
Set<String> sysEnvKeys = sysEnvMap.keySet();
tracer.log(TraceLevel.TRACE, "------------------------------------------------------------------------------------"); //$NON-NLS-1$
tracer.log(TraceLevel.TRACE, "--- System Environment used during initialization"); //$NON-NLS-1$
for( String key : sysEnvKeys) {
tracer.log(TraceLevel.TRACE, key + " = " + System.getenv(key)); //$NON-NLS-1$
}
tracer.log(TraceLevel.TRACE, "------------------------------------------------------------------------------------"); //$NON-NLS-1$


String AMQ_HOME = System.getenv("STREAMS_MESSAGING_AMQ_HOME"); //$NON-NLS-1$
if (AMQ_HOME != null) {
Expand Down Expand Up @@ -60,7 +74,7 @@ public static void setupClassPaths(OperatorContext context) {
tracer.log(TraceLevel.ERROR, "No classpath has been set!"); //$NON-NLS-1$
}

tracer.log(TraceLevel.TRACE, "Finished etting up classpath!"); //$NON-NLS-1$
tracer.log(TraceLevel.TRACE, "Finished setting up classpath!"); //$NON-NLS-1$

}

Expand Down

0 comments on commit ecdffef

Please sign in to comment.