ns3::LogComponent and related implementations. More...
#include "log.h"
#include "assert.h"
#include "environment-variable.h"
#include "fatal-error.h"
#include "string.h"
#include "ns3/core-config.h"
#include <algorithm>
#include <cstring>
#include <iostream>
#include <list>
#include <locale>
#include <map>
#include <numeric>
#include <stdexcept>
#include <utility>
Go to the source code of this file.
Classes | |
class | ns3::PrintList |
Handler for the undocumented print-list token in NS_LOG which triggers printing of the list of log components, then exits. More... | |
Namespaces | |
anonymous_namespace{log.cc} | |
Unnamed namespace for log.cc. | |
ns3 | |
Every class exported by the ns3 library is enclosed in the ns3 namespace. | |
Functions | |
static void | ns3::CheckEnvironmentVariables () |
Parse the NS_LOG environment variable. More... | |
static bool | ns3::ComponentExists (std::string componentName) |
Check if a log component exists. More... | |
LogComponent & | ns3::GetLogComponent (const std::string name) |
Get the LogComponent registered with the given name. More... | |
void | ns3::LogComponentDisable (const std::string &name, LogLevel level) |
Disable the logging output associated with that log component. More... | |
void | ns3::LogComponentDisableAll (LogLevel level) |
Disable all logging for all components. More... | |
void | ns3::LogComponentEnable (const std::string &name, LogLevel level) |
Enable the logging output associated with that log component. More... | |
void | ns3::LogComponentEnableAll (LogLevel level) |
Enable the logging output for all registered log components. More... | |
void | ns3::LogComponentPrintList () |
Print the list of logging messages available. More... | |
NodePrinter | ns3::LogGetNodePrinter () |
Get the LogNodePrinter function currently in use. More... | |
TimePrinter | ns3::LogGetTimePrinter () |
Get the LogTimePrinter function currently in use. More... | |
void | ns3::LogSetNodePrinter (NodePrinter np) |
Set the LogNodePrinter function to be used to prepend log messages with the node id. More... | |
void | ns3::LogSetTimePrinter (TimePrinter lp) |
Set the TimePrinter function to be used to prepend log messages with the simulation time. More... | |
Variables | |
static NodePrinter | ns3::g_logNodePrinter = nullptr |
The Log NodePrinter. More... | |
static TimePrinter | ns3::g_logTimePrinter = nullptr |
The Log TimePrinter. More... | |
static PrintList | ns3::g_printList |
Invoke handler for print-list in NS_LOG environment variable. More... | |
const std::map< std::string, ns3::LogLevel > | anonymous_namespace{log.cc}::LOG_LABEL_LEVELS |
Mapping of log level text names to values. More... | |
const std::map< ns3::LogLevel, std::string > | anonymous_namespace{log.cc}::LOG_LEVEL_LABELS |
Inverse mapping of level values to log level text names. More... | |
ns3::LogComponent and related implementations.
Definition in file log.cc.