NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
logger.hpp File Reference
#include "ns3/log.h"
Include dependency graph for logger.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ndn::util::detail::LoggerTimestamp
 A tag type used to output a timestamp to a stream. More...
 

Namespaces

 ndn
 Copyright (c) 2011-2015 Regents of the University of California.
 
 ndn::util
 
 ndn::util::detail
 

Macros

#define NDN_LOG_INIT(name)   NS_LOG_COMPONENT_DEFINE("ndn-cxx." BOOST_STRINGIZE(name))
 declare a log module More...
 
#define NDN_LOG_MEMBER_DECL()   static ::ns3::LogComponent g_log
 
#define NDN_LOG_MEMBER_INIT(cls, name)   ::ns3::LogComponent cls::g_log = ::ns3::LogComponent("ndn-cxx." BOOST_STRINGIZE(name), __FILE__)
 
#define NDN_LOG_MEMBER_DECL_SPECIALIZED(cls)   static ::ns3::LogComponent g_log
 
#define NDN_LOG_MEMBER_INIT_SPECIALIZED(cls, name)
 
#define NDN_LOG_TRACE(expression)   NS_LOG_LOGIC(expression)
 
#define NDN_LOG_DEBUG(expression)   NS_LOG_DEBUG(expression)
 
#define NDN_LOG_INFO(expression)   NS_LOG_INFO(expression)
 
#define NDN_LOG_WARN(expression)   NS_LOG_ERROR(expression)
 
#define NDN_LOG_ERROR(expression)   NS_LOG_WARN(expression)
 
#define NDN_LOG_FATAL(expression)   NS_LOG_FATAL(expression)
 

Enumerations

enum  ndn::util::LogLevel {
  ndn::util::LogLevel::FATAL = -1, ndn::util::LogLevel::NONE = 0, ndn::util::LogLevel::ERROR = 1, ndn::util::LogLevel::WARN = 2,
  ndn::util::LogLevel::INFO = 3, ndn::util::LogLevel::DEBUG = 4, ndn::util::LogLevel::TRACE = 5, ndn::util::LogLevel::ALL = 255
}
 Indicates the severity level of a log message. More...
 

Functions

std::ostream & ndn::util::operator<< (std::ostream &os, LogLevel level)
 Output LogLevel as a string. More...
 
LogLevel ndn::util::parseLogLevel (const std::string &s)
 Parse LogLevel from a string. More...
 
std::ostream & ndn::util::detail::operator<< (std::ostream &os, LoggerTimestamp)
 Write a timestamp to os. More...
 

Macro Definition Documentation

◆ NDN_LOG_INIT

#define NDN_LOG_INIT (   name)    NS_LOG_COMPONENT_DEFINE("ndn-cxx." BOOST_STRINGIZE(name))

declare a log module

Definition at line 90 of file logger.hpp.

◆ NDN_LOG_MEMBER_DECL

#define NDN_LOG_MEMBER_DECL ( )    static ::ns3::LogComponent g_log

Definition at line 92 of file logger.hpp.

◆ NDN_LOG_MEMBER_INIT

#define NDN_LOG_MEMBER_INIT (   cls,
  name 
)    ::ns3::LogComponent cls::g_log = ::ns3::LogComponent("ndn-cxx." BOOST_STRINGIZE(name), __FILE__)

Definition at line 95 of file logger.hpp.

◆ NDN_LOG_MEMBER_DECL_SPECIALIZED

#define NDN_LOG_MEMBER_DECL_SPECIALIZED (   cls)    static ::ns3::LogComponent g_log

Definition at line 100 of file logger.hpp.

◆ NDN_LOG_MEMBER_INIT_SPECIALIZED

#define NDN_LOG_MEMBER_INIT_SPECIALIZED (   cls,
  name 
)
Value:
template<> \
::ns3::LogComponent ::ndn::util::detail::ArgumentType<void(cls)>::g_log = ::ns3::LogComponent("ndn-cxx." BOOST_STRINGIZE(name), __FILE__)

Definition at line 103 of file logger.hpp.

◆ NDN_LOG_TRACE

#define NDN_LOG_TRACE (   expression)    NS_LOG_LOGIC(expression)

Definition at line 107 of file logger.hpp.

◆ NDN_LOG_DEBUG

#define NDN_LOG_DEBUG (   expression)    NS_LOG_DEBUG(expression)

Definition at line 108 of file logger.hpp.

◆ NDN_LOG_INFO

#define NDN_LOG_INFO (   expression)    NS_LOG_INFO(expression)

Definition at line 109 of file logger.hpp.

◆ NDN_LOG_WARN

#define NDN_LOG_WARN (   expression)    NS_LOG_ERROR(expression)

Definition at line 110 of file logger.hpp.

◆ NDN_LOG_ERROR

#define NDN_LOG_ERROR (   expression)    NS_LOG_WARN(expression)

Definition at line 111 of file logger.hpp.

◆ NDN_LOG_FATAL

#define NDN_LOG_FATAL (   expression)    NS_LOG_FATAL(expression)

Definition at line 112 of file logger.hpp.