do not dump debug out on std::cout
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 03 May 2011 11:16:58 +0200
changeset 7111 db111d14f0c1
parent 7110 365f79b75d29
child 7112 3b5c95925d62
do not dump debug out on std::cout
src/wimax/test/phy-test.cc
--- a/src/wimax/test/phy-test.cc	Tue May 03 11:16:39 2011 +0200
+++ b/src/wimax/test/phy-test.cc	Tue May 03 11:16:58 2011 +0200
@@ -39,6 +39,8 @@
 
 using namespace ns3;
 
+NS_LOG_COMPONENT_DEFINE("WimaxPhyTest");
+
 /*
  * Configure a network with 3 SS and 1 BS
  * Install a SIMPLE OFDM PHY layer on all nodes and check that all SSs
@@ -92,7 +94,7 @@
       if (ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> ()->IsRegistered ()
           == false)
         {
-          std::cout << "SS[" << i << "] not registered" << std::endl;
+          NS_LOG_DEBUG ("SS[" << i << "] not registered");
           return true; // Test fail because SS[i] is not registered
         }
     }
@@ -109,7 +111,7 @@
   frameDuratioTab[7] = { 0.0025, 0.004, 0.005, 0.008, 0.01, 0.0125, 0.02 };
   for (int i = 0; i < 7; i++)
     {
-      std::cout << "Frame Duration = " << frameDuratioTab[i] << std::endl;
+      NS_LOG_DEBUG ("Frame Duration = " << frameDuratioTab[i]);
       if (DoRunOnce (frameDuratioTab[i]) != false)
         {
           return;