WriteToLogEx
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 writeToLogEx(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 thewriteToLogfunction, neither comment characters ("//") nor time stamps will be printed at the beginning of a line.
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.
// write marker with current date and time to logging file
void MarkLogFileWithTimeString(void)
{
char timeBuffer[64];
getLocalTimeString(timeBuffer);
writeToLogEx("===> %s",timeBuffer);
}
Related APIs
snprintf | write | writeToLog