Printing out the context
This recipe here is for completeness rather than because it is in any way complex.
Getting ready
Open the jo_cook_ch10_0080_tContextDump
job.
How to do it...
The steps for printing out the context are as follows:
- Open the Context tab, and you will see a set of context variables.
- Drag a
tContextDump
component from the palette. - Attach a
tLogRow
component. - Run the job.
How it works...
tContextDump
simply dumps all the context variables defined within the job into a flow that can then be logged via tLogRow
.
There's more…
This component is most useful when running code that has been deployed to a server, because the log information is usually stored in a file. This allows us to check the values of the context variables at the time of execution that would otherwise be hidden from us. This is invaluable for debugging a deployed process that has failed.
Tip
Often, contexts contain sensitive information, such as user names and passwords to system resources. If you do not want...