Hi,
I am using ns3-3.25.
I am unable to get the logging to work in ns3.
I have my code in the below structure:
scratch/testfile.cc
src/applications/model/allFiles
In my testfile.cc I have :
int main(int argc, char * argv[])
{
LogComponentEnable("ComponentName", LOG_LEVEL_ALL);
}
in my src/applications/model/file.cc
NS_LOG_COMPONENT_DEFINE("ComponentName");
namespace ns3 {
TypeID
ComponentName::GetTypeId (void)
{
attributes ....
return tid;
}
function_name(){
NS_LOG_FUNCTION(this);
NS_LOG_INFO("print this value"<<value<<"\n";
}
}//namespace ends here
Can somebody help me figure why am I unable to log when I run using the below:
NS_LOG="ComponentName" ../waf --run test
Also when I run NS_LOG="print-list" ./waf ...
I get the below output:
ComponentName=0
Thanks,
Nakul