omnet++: Configuring logging

百般思念 提交于 2021-01-29 03:52:48

问题


I would like to use the oment++ logging facility for debug logging. For example:

       EV_DEBUG << " SASSim::SASSim" << endl;

However, I can't figure out how to set my log level and the logging file in the simulation manual. I thought omnetpp.ini would allow me to specify this. Any pointers on where to look? Thanks.


回答1:


Direct from the manual (10.6.4):

https://omnetpp.org/doc/omnetpp/manual/#sec:config-sim:configuring-cmdenv

In Cmdenv, logging can be configured using omnetpp.ini configuration options. The configured settings remain in effect during the whole simulation run unless overridden programatically.

  • cmdenv-output-file redirects standard output to a file

  • cmdenv-log-prefix determines the log prefix of each line

  • <object-full-path>.cmdenv-log-level restricts output on a per-component basis

i.e. you can write:

**.phy.cmdenv-log-level = warn

to set the log level for all modules named phy

Qtenv and Tkenv have their own dialogs where you can set the log level interactively.



来源:https://stackoverflow.com/questions/42982187/omnet-configuring-logging

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!