170 #define NS_LOG_COMPONENT_DEFINE(name) \
171 static ns3::LogComponent g_log = ns3::LogComponent (name)
183 #define NS_LOG_COMPONENT_DEFINE_MASK(name, mask) \
184 static ns3::LogComponent g_log = ns3::LogComponent (name, mask)
193 #define NS_LOG_ERROR(msg) \
194 NS_LOG (ns3::LOG_ERROR, msg)
203 #define NS_LOG_WARN(msg) \
204 NS_LOG (ns3::LOG_WARN, msg)
213 #define NS_LOG_DEBUG(msg) \
214 NS_LOG (ns3::LOG_DEBUG, msg)
223 #define NS_LOG_INFO(msg) \
224 NS_LOG (ns3::LOG_INFO, msg)
233 #define NS_LOG_LOGIC(msg) \
234 NS_LOG (ns3::LOG_LOGIC, msg)
305 char const *
Name (
void)
const;
365 m_os <<
", " << param;
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
void LogComponentDisableAll(enum LogLevel level)
Disable all logging for all components.
void LogSetNodePrinter(LogNodePrinter printer)
std::ostream & m_os
Underlying output stream.
ParameterLogger & operator<<(T param)
Write a function parameter on the output stream, separating paramters after the first by ...
bool m_first
First argument flag, doesn't get ,.
A single log component configuration.
ParameterLogger(std::ostream &os)
Constructor.
void Disable(const enum LogLevel level)
Disable logging at level for this LogComponent.
void EnvVarCheck(void)
Parse the NS_LOG environment variable for options relating to this LogComponent.
void LogSetTimePrinter(LogTimePrinter printer)
rare ad-hoc debug messages
control flow tracing within functions
Insert , when streaming function arguments.
serious error messages only
void Enable(const enum LogLevel level)
Enable this LogComponent at level
bool IsEnabled(const enum LogLevel level) const
Check if this LogComponent is enabled for level
void SetMask(const enum LogLevel level)
Prevent the enabling of a specific LogLevel.
LogNodePrinter LogGetNodePrinter(void)
LogComponent(const std::string &name, const enum LogLevel mask=LOG_NONE)
Constructor.
prefix all trace prints with simulation time
void LogComponentDisable(char const *name, enum LogLevel level)
Disable the logging output associated with that log component.
prefix all trace prints with function
int32_t m_mask
Blocked LogLevels.
int32_t m_levels
Enabled LogLevels.
prefix all trace prints with simulation node
void(* LogTimePrinter)(std::ostream &os)
bool IsNoneEnabled(void) const
Check if all levels are disabled.
void(* LogNodePrinter)(std::ostream &os)
LogLevel
Logging severity classes and levels.
informational messages (e.g., banners)
char const * Name(void) const
Get the name of this LogComponent.
prefix all trace prints with log level (severity)
static std::string GetLevelLabel(const enum LogLevel level)
Get the string label for the given LogLevel.
LogTimePrinter LogGetTimePrinter(void)
void LogComponentPrintList(void)
Print the list of logging messages available.
std::string m_name
LogComponent name.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.