使用 cmdenv-output-file 将日志输出存储到一个文件中

Store the log output into a file with cmdenv-output-file

我需要将Omnet++/Tkenv的show log模块的内容恢复到一个文件中,我在omnetpp.ini中添加:

cmdenv-express-mode = false
cmdenv-输出文件 = log.txt

但我有两类问题:
1)模拟后,我没有找到"log.txt" 如果我不创建它
2) 当我在 ../omnetpp-4.6/log.txt 下启动模拟之前创建它时,我也发现它是空的

我使用了EV <<来显示我使用的变量内容,我需要解决这个问题才能分析流量,请问我该怎么做?

您必须在 Cmdenv 模式下开始模拟。要做到这一点去 Run | Run Configurations | select 您的配置,然后 select Command line as User interface.
日志文件默认创建在 simulations 目录中。