trace logs for java code in datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sneha123
Participant
Posts: 17
Joined: Mon Nov 05, 2012 8:42 am

trace logs for java code in datastage

Post by sneha123 »

1>I have created java code for sending xml as datastage rows to jms queue and i am calling java class in transformer

My Job is successful but some java block is not running so inorder to test it i have used trace command:

Code: Select all

		if (isTraceOn()) {
		trace("Trace is on");
		}
		trace("Tracing has been turned on"); 
		}
Even I have placed some trace points to check value of variables:

Code: Select all

	 Row inputRow = readRow();
	trace("Java class just received a row...");
	String value = inputRow.getValueAsString(columnNumber);
	trace(value);
2>In Administrator Enabled option button to activate tracing
3>I have used the $APT_DUMP_SCORE=True

But my question where to see java code logs where i have put the trace points nothing is showing in director logs
Sneha!!!!!
sneha123
Participant
Posts: 17
Joined: Mon Nov 05, 2012 8:42 am

Post by sneha123 »

one more thing to note that job is parallel 8.1 not server
Sneha!!!!!
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

when it was initially conceived, that feature reacted to the "trace" tab that is in a Server Job at the "run" dialog when you first run the Job. Not sure if it has a way of being triggered in an EE Job or even if it works in a Server Job in 8.1. I stopped using it in lieu of just compiling with messages going to the log and then commenting them out. Not fancy, but it worked. You might try your Stage in a "test" Server Job, if for no other reason than to validate the use of the Trace tab and if it works, aid in your debugging.

Various folks have suggested in the past several years that log4j is a good way to go....I haven't tried it so cannot comment.

The new JavaStage implementation in 9.1 (announced at IOD) has a nice logger.debug() method that is triggered by the setting of an environment variable.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply