When using scripting within a map function or data process step, it can be very helpful to view to values of variables at run time to assist with development and debugging. You can do this by writing entries to the process log using Groovy script.
You'll be using the ExecutionUtil class.
// Import the ExecutionUtil class
import com.boomi.execution.ExecutionUtil;
logger = ExecutionUtil.getBaseLogger();
customerNumber = "Bob";
// This will print "Processing customer: Bob" into the process logs
logger.info("Processing customer: " + customerNumber);
// You can also use the info(), warning(), severe(), fine(), finer(), and finest() methods to create entries with different log levels.
// logger.warning("Warning Problems");
// logger.severe("Severe Problems");
// logger.fine("just a message");
Throughout your script, you can use the logger lines to write an entry to the process log. Writing to the process log is a good way to inspect the value of a variable during run time (execution) since executions will not show granular details like during test mode. You can reference a variable in the log entry as shown above with customerName. You can of course pull in dynamic document/process properties to inspect and use.Tip: Create your messages at the WARNING level to be able to quickly filter the Process Log to find your entries. Remember, even though it is a WARNING level, it will not generate an alert notification or affect the document or execution status.