|
Bugzilla – Full Text Bug Listing |
| Summary: | Nicer logging of parameters | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | core | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | ||
| Priority: | P1 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
patch
patch v2 patch, v3 patch v3.1 (just updated) |
||
|
Description
Gustavo J. A. M. Carneiro
2007-09-24 14:35:13 UTC
Created attachment 67 [details]
patch
Created attachment 68 [details]
patch v2
This patch replaces all NS_LOG_PARAM calls with NS_LOG_PARAMS.
OK to commit?
+1 Created attachment 69 [details]
patch, v3
This patch builds on the previous version and adds support for logging named parameters, like this:
NS_LOG_PARAMS_BEGIN ();
NS_LOG_PARAM (this);
NS_LOG_PARAM (daddr);
NS_LOG_PARAM (dport);
NS_LOG_PARAM (saddr);
NS_LOG_PARAM (sport);
NS_LOG_PARAM (incomingInterface);
NS_LOG_PARAMS_END ();
Which prints something like:
std::list<ns3::Ipv4EndPoint*, std::allocator<ns3::Ipv4EndPoint*> > ns3::Ipv4EndPointDemux::Lookup(ns3::Ipv4Address, uint16_t, ns3::Ipv4Address, uint16_t, ns3::Ptr<ns3::Ipv4Interface>) (this=0x60d3c0, daddr=10.1.2.1, dport=9, saddr=10.1.3.2, sport=49153, incomingInterface=0x60fbe0)
Created attachment 86 [details]
patch v3.1 (just updated)
applied as changeset 1828 |