src/core/log.h File Reference

#include <string>
#include <iostream>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ns3::LogComponent
class  ns3::ParameterLogger

Namespaces

namespace  ns3
 

Every class exported by the ns3 library is enclosed in the ns3 namespace.


Defines

#define NS_LOG_COMPONENT_DEFINE(name)   static ns3::LogComponent g_log = ns3::LogComponent (name)
#define NS_LOG_APPEND_TIME_PREFIX
#define NS_LOG_APPEND_FUNC_PREFIX
#define NS_LOG_APPEND_CONTEXT
#define NS_LOG(level, msg)
#define NS_LOG_ERROR(msg)   NS_LOG(ns3::LOG_ERROR, msg)
#define NS_LOG_WARN(msg)   NS_LOG(ns3::LOG_WARN, msg)
#define NS_LOG_DEBUG(msg)   NS_LOG(ns3::LOG_DEBUG, msg)
#define NS_LOG_INFO(msg)   NS_LOG(ns3::LOG_INFO, msg)
#define NS_LOG_FUNCTION_NOARGS()
#define NS_LOG_FUNCTION(parameters)
#define NS_LOG_LOGIC(msg)   NS_LOG(ns3::LOG_LOGIC, msg)
#define NS_LOG_UNCOND(msg)

Typedefs

typedef void(* ns3::LogTimePrinter )(std::ostream &os)

Enumerations

enum  ns3::LogLevel {
  ns3::LOG_NONE = 0x00000000, ns3::LOG_ERROR = 0x00000001, ns3::LOG_LEVEL_ERROR = 0x00000001, ns3::LOG_WARN = 0x00000002,
  ns3::LOG_LEVEL_WARN = 0x00000003, ns3::LOG_DEBUG = 0x00000004, ns3::LOG_LEVEL_DEBUG = 0x00000007, ns3::LOG_INFO = 0x00000008,
  ns3::LOG_LEVEL_INFO = 0x0000000f, ns3::LOG_FUNCTION = 0x00000010, ns3::LOG_LEVEL_FUNCTION = 0x0000001f, ns3::LOG_LOGIC = 0x00000020,
  ns3::LOG_LEVEL_LOGIC = 0x0000003f, ns3::LOG_ALL = 0x3fffffff, ns3::LOG_LEVEL_ALL = LOG_ALL, ns3::LOG_PREFIX_FUNC = 0x80000000,
  ns3::LOG_PREFIX_TIME = 0x40000000
}

Functions

void ns3::LogComponentEnable (char const *name, enum LogLevel level)
void ns3::LogComponentEnableAll (enum LogLevel level)
void ns3::LogComponentDisable (char const *name, enum LogLevel level)
void ns3::LogComponentDisableAll (enum LogLevel level)
void ns3::LogComponentPrintList (void)
void ns3::LogSetTimePrinter (LogTimePrinter printer)
LogTimePrinter ns3::LogGetTimePrinter (void)

Define Documentation

#define NS_LOG_APPEND_CONTEXT

Definition at line 170 of file log.h.

#define NS_LOG_APPEND_FUNC_PREFIX
Value:
if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC))                   \
    {                                                           \
      std::clog << g_log.Name () << ":" <<                      \
        __FUNCTION__ << "(): ";                                 \
    }                                                           \

Definition at line 162 of file log.h.

#define NS_LOG_APPEND_TIME_PREFIX
Value:
if (g_log.IsEnabled (ns3::LOG_PREFIX_TIME))                   \
    {                                                           \
      ns3::LogTimePrinter printer = ns3::LogGetTimePrinter ();  \
      if (printer != 0)                                         \
        {                                                       \
          (*printer) (std::clog);                               \
          std::clog << " ";                                     \
        }                                                       \
    }

Definition at line 151 of file log.h.

Generated on Thu Dec 3 14:06:33 2009 for NS-3 by  doxygen 1.6.3