Print log component list alphabetically.

This commit is contained in:
Peter D. Barnes, Jr.
2013-10-28 15:10:24 -07:00
parent 4e6c8358f8
commit 10381f6af1
2 changed files with 4 additions and 3 deletions

View File

@@ -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
----------

View File

@@ -39,8 +39,8 @@ namespace ns3 {
LogTimePrinter g_logTimePrinter = 0;
LogNodePrinter g_logNodePrinter = 0;
typedef std::list<std::pair <std::string, LogComponent *> > ComponentList;
typedef std::list<std::pair <std::string, LogComponent *> >::iterator ComponentListI;
typedef std::map<std::string, LogComponent *> ComponentList;
typedef std::map<std::string, LogComponent *>::iterator ComponentListI;
static class PrintList
{
@@ -99,7 +99,7 @@ LogComponent::LogComponent (const std::string & name)
NS_FATAL_ERROR ("Log component \""<<name<<"\" has already been registered once.");
}
}
components->push_back (std::make_pair (name, this));
components->insert (std::make_pair (name, this));
}
void