Logging Block Control by Test Modules

Question:
How can test modules control the logging block to change the filename of logging during a test?
Answer:
For CANoe < 7.6 SP3
Example for one single logging block, can easily be extended for multiple logging blocks (for CANoe < 7.6 SP3):

    on sysvar_update sysvar::Logging_Test::StartLoggingWithNewName
    {
      char fileName [1000];
      sysGetVariableString(this, fileName, 1000);
      stopLogging();
      setLogFileName(fileName);
      startLogging();
    }

For CANoe > 7.6 SP3
The log file name can be directly set with: setLogFileName(char strLoggingBlockName[], char fileName[]);



Article ID: 188
Last updated: 2019-03-14
Revision: 2
CANalyzer/CANoe -> Testing -> Logging Block Control by Test Modules
https://kb.vector.com/entry/188/