enable logs for simple global routing eample

44 views
Skip to first unread message

Parham Sh

unread,
May 7, 2016, 10:24:38 AM5/7/16
to ns-3-users

   hello, how could I enable logs for this example:
   right now it doesn't show any log when I run this script.
   could you please help me. thanks


Konstantinos

unread,
May 7, 2016, 11:44:29 AM5/7/16
to ns-3-users

Parham Sh

unread,
May 8, 2016, 2:03:45 AM5/8/16
to ns-3-users
Thank you, it helped me a lot.
I run the example in the way you see here and it worked fine.

 # NS_LOG="PacketSink=level_all|prefix_time|prefix_node" ./waf --run scratch/simple-global-routing

but I like to know is there any way to limit the log to an specific time interval ?

Konstantinos

unread,
May 8, 2016, 1:34:19 PM5/8/16
to ns-3-users
Hi,

I am not aware of any method to do that. For sure this command line configuration will not work for the time interval. 
You might try the Simulator::Schedule and the LogComponentEnable method but I think this is only configured before the simulation starts, you can't stop it afterwards.
You can always create a script to post-process your trace file and crop it for the time interval you are interested.

K.

pdbarnes

unread,
May 8, 2016, 3:59:20 PM5/8/16
to ns-3-users
I haven't tried it but you should be able to Schedule LogComponentEnable to turn on/off logging when you want. (IIRC the enabled state is checked on each invocation of NS_LOG)

Peter

Reply all
Reply to author
Forward
0 new messages