LostInTheFrequencyDomain
LostInTheFrequencyDomain

Reputation: 1147

omnet++: Configuring logging

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.

Upvotes: 1

Views: 2562

Answers (1)

Rudi
Rudi

Reputation: 6681

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.

Upvotes: 3

Related Questions