Synopsis:
applog(string1,[string2[,...]])
Arguments:
string1,string2... - The string arguments provided are concatenated together for form the final log string.
Description: This function concatenates the string arguments passed to it into a single string and writes the resulting string to the Application Terminal scrolling area. The function also writes the log string to the application log file, which resides in the directory where the Telecom Engine run-time program was started from.
The application log files cycle though ten application logs: APPLOG0.LOG, APPLOG1.LOG...APPLOG9.LOG before starting back at the beginning and overwriting the previous application logs again. Each application log file will reach a maximum size of 2MB before moving on to the next file - so a total of 20MB of log data will be stored until it starts to get overwritten. Upon start-up of the Terminal Console DLL, the last log file that was written to is located (by modified date) and the next application log file is then used and overwritten. Therefore each time the Telecom Engine is started the Terminal Console DLL will start at the next log file after the last one that was written. This way a history of log files is maintained which may be useful for debugging purposes. If you want to always start at APPLOG0.LOG then you should delete this log file (say in a batch file) each time the system is restarted.
The log file messages that are written to the application logs have some information prefixed to the string before writing to the log. This information has the following format:
<date (YYYYMMDD)>:<time (HHMMSS.ms)>: <Message Type>:<Task_name (Tex file name)>: <Task ID>: <Program Counter (Hex)>: string
The <Message Type> Field will be one of the following:
L - Normal Log message
E - Error Message
D - Debug Message
T - Trace Message
For example in the following program in TES file MYAPP.TES
int a,b;
main
a=123;
b=45678;
applog("The value of a=",a);
applog("The value of b=",b);
endmain
Would result in something similar to this being written to the application log:
APPLOG0.LOG
20060413:151334.567:L:myapp:0:000a: The value of a=123
20060413:151334.567:L:myapp:0:0023: The value of b=4567
Return Value:
Returns 0