Why not use print() to debug?
The first impression when using
print() is that the results are identical, and it is true that the Annotations that they produce are the same:
However there is one major difference when you run the channel,
print() creates a informational Iguana Log entry but
trace() does not. So to prevent the Log from being cluttered with debugging information we recommend that you use
I ran 200 sample messages through the channel and the print statement created 200 informational message entries in the log. The last three messages are shown above. As you can see this is not desirable behaviour, particularly if you are processing tens of thousands of messages per day.
Note: The Iguana queue is not active in the editor (test mode). So the log messages from
print() are only created when the channel is run.
Tip: A better way to create informational messages is to use the Iguana logging functions. These give you control over which type of message you want to create.