Please enable JavaScript to view this site.

ESL Documentation

Navigation: » No topics above this level «

Q16 How do I send debugging and other information to ESL's errorlog?

Scroll Prev Top Next More

The ESL errorlog uses the STDERR data stream, so it is very simple to write strings of data to the file. You must call the 'C' runtime routine "write" passing the constant 2 as the file identifier, followed the string to be display plus the length of the string. You must ensure each line sent to the errorlog is terminated by a carriage return and newline (i.e. "\r\n"), otherwise the line will be overwritten by the following line sent to the errorlog. A typical call should look like:

FAQs_CCode_Q16_1

Note. The "write" routine is flexible, so any form of string can be passed. You can also split the line of data into several 'write' calls, for example;

FAQs_CCode_Q16_2