CAPL Script

SetLogFileName

Syntax

setLogFileName(char fileName[]);

setLogFileName(char strLoggingBlockName[], char fileName[]);

Function

Sets the name of the logging file. If a valid extension is given it also changes the file type.

Parameters

fileName The name may be an absolute path, a single filename or a relative path. If an absolute path or a relative path is supplied, all non existing directories of the path will be created. The logging file will be placed in the directory of the current configuration, if a single filename is supplied, or in the path relative to the configuration file if a relative path is supplied. The directories of the path must be separated by a backslash (''). The filename can contain a file extension. If no extension is input, the last used file type will be set automatically. If an invalid extension is given the function will do nothing. The new name will only be changed with a newsetLogFileNamecall or by a corresponding entry in the configuration dialog of the logging file. If the Logging Block does not log (logging is not active) the name is changed immediately. If the Logging Block logs (logging is active) the new name will be taken over with the next trigger event or with a new measurement start.

strLoggingBlockName Name of the Logging Block.

Return Values

...setLogFileName("Logging1", "newlog");...Sets the name of the logging file to "newlog" in the directory of the current configuration. ...setLogFileName("Logging1", "c:\\canw\\demo\\automot\\newlog");...Sets the absolute path of the logging file. ...setLogFileName("Logging1", "..\\Logging\\newlog");...Sets the relative path of the logging file.