WriteToLog
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
void writeToLog(char format[], ...);
Function
Writes an output string to an ASCII logging file. Write is based on the C functionprintf. The compiler cannot check the format string. Illegal format entries will lead to undefined results. Different to thewriteToLogExfunction, comment characters ("//") and a time stamp at the beginning of each line will be printed.
Parameters
Format string, variables or expressions Legal format expressions:
Return Values
—
Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.
void MarkLogFile(int marker) {
// marks line of ASCII logging file with an integer
writeToLog("===> %d",marker);
}