add logging support
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 23 Oct 2007 13:11:23 +0200
changeset 2014 c1bc06ac5152
parent 2013 4a5335c67eac
child 2015 4dd68ab5c55e
add logging support
src/devices/wifi/mac-rx-middle.cc
--- a/src/devices/wifi/mac-rx-middle.cc	Tue Oct 23 13:11:10 2007 +0200
+++ b/src/devices/wifi/mac-rx-middle.cc	Tue Oct 23 13:11:23 2007 +0200
@@ -19,21 +19,17 @@
  */
 
 #include "mac-rx-middle.h"
-#include "ns3/packet.h"
 #include "wifi-mac-header.h"
 
 #include "ns3/assert.h"
+#include "ns3/log.h"
+#include "ns3/packet.h"
+#include "ns3/simulator.h"
 #include <list>
 
-#define noRX_MIDDLE_TRACE 1
+NS_LOG_COMPONENT_DEFINE ("MacRxMiddle");
 
-#ifdef RX_MIDDLE_TRACE
-#include <iostream>
-# define TRACE(x) \
-  std::cout <<"RX MIDDLE "<<x<<std::endl;
-#else /* RX_MIDDLE_TRACE */
-# define TRACE(x)
-#endif /* RX_MIDDLE_TRACE */
+#define TRACE(x) NS_LOG_DEBUG(Simulator::Now () << " " << x)
 
 namespace ns3 {