gtpc1m51 | Transmission Control Protocol/Internet Protocol |
You can use the logging facilities of the syslog daemon server with your TPF application programs. Include the syslog.h header file with C programs so that these programs can open a log facility, send log messages to the syslog daemon, and close the facility:
#include <syslog.h> (1) openlog("tpf", LOG_PID, LOG_LOCAL0); (2) syslog(LOG_INFO, "Hello from tpf"); (3) closelog();
(1) Open a log facility with a facility name of local0. Prefix each line in the log file with the program name (tpf) and the process ID.
(2) Log an informational message with the specified content.
(3) Close the log facility name.
The preceding statements created the following line in the log file:
<May 26 11:27:51>tpf[3014660]: Hello from tpf
See TPF C/C++ Language Support User's Guide for more information about the syslog function.