diff --git a/RELEASE_NOTES b/RELEASE_NOTES index e3090780d..d67e9cc87 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -27,6 +27,7 @@ New user-visible features allows to generate a random position uniformly distributed in the volume of a chosen room inside a chosen building. - Logging wildcards: allow "***" as synonym for "*=**" to turn on all logging. +- The log component list ("NS_LOG=print-list") is now printed alphabetically. Bugs fixed ---------- diff --git a/src/core/model/log.cc b/src/core/model/log.cc index 8feb7fc09..899d63798 100644 --- a/src/core/model/log.cc +++ b/src/core/model/log.cc @@ -39,8 +39,8 @@ namespace ns3 { LogTimePrinter g_logTimePrinter = 0; LogNodePrinter g_logNodePrinter = 0; -typedef std::list > ComponentList; -typedef std::list >::iterator ComponentListI; +typedef std::map ComponentList; +typedef std::map::iterator ComponentListI; static class PrintList { @@ -99,7 +99,7 @@ LogComponent::LogComponent (const std::string & name) NS_FATAL_ERROR ("Log component \""<push_back (std::make_pair (name, this)); + components->insert (std::make_pair (name, this)); } void