A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
anonymous_namespace{log.cc} Namespace Reference

Unnamed namespace for log.cc. More...

Variables

const std::map< std::string, ns3::LogLevelLOG_LABEL_LEVELS
 Mapping of log level text names to values.
 
const std::map< ns3::LogLevel, std::string > LOG_LEVEL_LABELS
 Inverse mapping of level values to log level text names.
 

Detailed Description

Unnamed namespace for log.cc.

Variable Documentation

◆ LOG_LABEL_LEVELS

const std::map<std::string, ns3::LogLevel> anonymous_namespace{log.cc}::LOG_LABEL_LEVELS
Initial value:
= {
{"none", ns3::LOG_NONE},
{"error", ns3::LOG_ERROR},
{"level_error", ns3::LOG_LEVEL_ERROR},
{"warn", ns3::LOG_WARN},
{"level_warn", ns3::LOG_LEVEL_WARN},
{"debug", ns3::LOG_DEBUG},
{"level_debug", ns3::LOG_LEVEL_DEBUG},
{"info", ns3::LOG_INFO},
{"level_info", ns3::LOG_LEVEL_INFO},
{"function", ns3::LOG_FUNCTION},
{"level_function", ns3::LOG_LEVEL_FUNCTION},
{"logic", ns3::LOG_LOGIC},
{"level_logic", ns3::LOG_LEVEL_LOGIC},
{"all", ns3::LOG_ALL},
{"level_all", ns3::LOG_LEVEL_ALL},
{"prefix_func", ns3::LOG_PREFIX_FUNC},
{"prefix_time", ns3::LOG_PREFIX_TIME},
{"prefix_node", ns3::LOG_PREFIX_NODE},
{"prefix_level", ns3::LOG_PREFIX_LEVEL},
{"prefix_all", ns3::LOG_PREFIX_ALL}
}
@ LOG_LEVEL_ALL
Print everything.
Definition log.h:105
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
Definition log.h:107
@ LOG_LEVEL_LOGIC
LOG_LOGIC and above.
Definition log.h:99
@ LOG_NONE
No logging.
Definition log.h:84
@ LOG_PREFIX_TIME
Prefix all trace prints with simulation time.
Definition log.h:108
@ LOG_FUNCTION
Function tracing for non-trivial function calls.
Definition log.h:95
@ LOG_ERROR
Serious error messages only.
Definition log.h:86
@ LOG_WARN
Warning messages.
Definition log.h:89
@ LOG_INFO
Something happened to change state.
Definition log.h:92
@ LOG_PREFIX_ALL
All prefixes.
Definition log.h:111
@ LOG_LEVEL_FUNCTION
LOG_FUNCTION and above.
Definition log.h:96
@ LOG_LEVEL_ERROR
LOG_ERROR and above.
Definition log.h:87
@ LOG_ALL
Print everything.
Definition log.h:104
@ LOG_LEVEL_WARN
LOG_WARN and above.
Definition log.h:90
@ LOG_LEVEL_DEBUG
LOG_DEBUG and above.
Definition log.h:102
@ LOG_PREFIX_LEVEL
Prefix all trace prints with log level (severity).
Definition log.h:110
@ LOG_LOGIC
Debugging logs for key branches and decisions in a function.
Definition log.h:98
@ LOG_PREFIX_NODE
Prefix all trace prints with simulation node.
Definition log.h:109
@ LOG_LEVEL_INFO
LOG_INFO and above.
Definition log.h:93
@ LOG_DEBUG
Full voluminous logging to support debugging.
Definition log.h:101

Mapping of log level text names to values.

Definition at line 40 of file log.cc.

◆ LOG_LEVEL_LABELS

const std::map<ns3::LogLevel, std::string> anonymous_namespace{log.cc}::LOG_LEVEL_LABELS
Initial value:
= {[]() {
std::map<ns3::LogLevel, std::string> labels;
for (const auto& [label, lev] : LOG_LABEL_LEVELS)
{
if (labels.find(lev) == labels.end())
{
std::string pad{label};
if (pad.size() < 5)
{
pad.insert(pad.size(), 5 - pad.size(), ' ');
}
std::transform(pad.begin(), pad.end(), pad.begin(), ::toupper);
labels[lev] = pad;
}
}
return labels;
}()}
const std::map< std::string, ns3::LogLevel > LOG_LABEL_LEVELS
Mapping of log level text names to values.
Definition log.cc:40

Inverse mapping of level values to log level text names.

Definition at line 70 of file log.cc.