Bug 1548 - NS_LOG environment variable broken
NS_LOG environment variable broken
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
PC Linux
: P1 blocker
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-10 05:27 UTC by Nicola Baldo
Modified: 2012-12-13 01:03 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Baldo 2012-12-10 05:27:08 UTC
NS_LOG does not seem to be working for any log component out of the core module.

How to reproduce:

using ns-3-dev changeset 065a297f6c9d

$ ./waf configure --enable-modules=lte,wifi --enable-examples --enable-tests

$ ./waf --run wifi-adhoc
[runs ok]

$ NS_LOG=Config ./waf --run wifi-adhoc
[correctly shows logging of Config log component]

$ NS_LOG=YansWifiPhy ./waf --run wifi-adhoc
Waf: Entering directory `/locale/ns-3-dev/build'
Waf: Leaving directory `/locale/ns-3-dev/build'
'build' finished successfully (0.978s)
Time=0
EventId=0
Scheduler=0
ListScheduler=0
MapScheduler=0
HeapScheduler=0
CalendarScheduler=0
EventImpl=0
Simulator=0
SimulatorImpl=0
DefaultSimulatorImpl=0
Timer=0
Watchdog=0
Synchronizer=0
MakeEvent=0
Breakpoint=0
TypeID=0
AttributeConstructionList=0
ObjectBase=0
RefCountBase=0
Object=0
Test=0
RandomVariable=0
RandomVariableStream=0
RngSeedManager=0
RngStream=0
CommandLine=0
AttributeValue=0
Boolean=0
Integer=0
Uinteger=0
Enum=0
Double=0
int64x64=0
Pointer=0
ObjectPtrContainer=0
ObjectFactory=0
GlobalValue=0
TraceSourceAccessor=0
Config=0
Callback=0
Names=0
Vector=0
FatalImpl=0
SystemPath=0
SystemWallClockMsPrivate=0
int64x64-128=0
RealtimeSimulatorImpl=0
msg="Invalid or unregistered component name "YansWifiPhy" in env variable NS_LOG, see above for a list of valid components", file=../src/core/model/log.cc, line=494
terminate called without an active exception

similarly:

$ ./waf --run lena-simple
[runs ok]

$ NS_LOG=LteHelper ./waf --run lena-simple
[same list of log components shown above]
msg="Invalid or unregistered component name "LteHelper" in env variable NS_LOG, see above for a list of valid components", file=../src/core/model/log.cc, line=494
Comment 1 Mathieu Lacage 2012-12-10 09:32:47 UTC
It appears that it is not seeing any of the log components from the non-core sofile.
Comment 2 Tom Henderson 2012-12-10 09:41:00 UTC
This is probably due to the bug 1531 patch applied Saturday (with inadequate testing on my part-- sorry).  I'm looking into whether Peter and/or Mitch can have a look today.  We can revert the 1531 patch if this is not easily resolved.
Comment 3 Mitch Watrous 2012-12-11 14:28:36 UTC
It turns out that it is not the changes for bug 1531 (NS_LOG related bug).

The problem first shows up after this commit for bug 954 (Time resolution setting bug):

    http://code.nsnam.org/ns-3-dev/rev/1a2abe07b53d

which doesn't touch any of the log code
Comment 4 Tom Henderson 2012-12-13 01:03:41 UTC
this seems to have been cleared in changeset 8934b7c0c1cb