diff --git a/core/logger-factory.cpp b/core/logger-factory.cpp
deleted file mode 100644
index 215b087..0000000
--- a/core/logger-factory.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2017,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "logger-factory.hpp"
-
-#include <ndn-cxx/util/logging.hpp>
-
-#include <boost/algorithm/string/case_conv.hpp>
-#include <boost/range/adaptor/map.hpp>
-
-#include <iostream>
-
-#ifdef HAVE_CUSTOM_LOGGER
-#error "This file should not be compiled when custom logger is used"
-#endif
-
-namespace nfd {
-
-NFD_LOG_INIT("LoggerFactory");
-
-LoggerFactory&
-LoggerFactory::getInstance()
-{
-  static LoggerFactory globalLoggerFactory;
-
-  return globalLoggerFactory;
-}
-
-LoggerFactory::LoggerFactory()
-  : m_defaultLevel(LOG_INFO)
-{
-  m_levelNames["NONE"] = LOG_NONE;
-  m_levelNames["ERROR"] = LOG_ERROR;
-  m_levelNames["WARN"] = LOG_WARN;
-  m_levelNames["INFO"] = LOG_INFO;
-  m_levelNames["DEBUG"] = LOG_DEBUG;
-  m_levelNames["TRACE"] = LOG_TRACE;
-  m_levelNames["ALL"] = LOG_ALL;
-
-  // Let ndn-cxx logging facility initialize Boost.Log backend,
-  // so that only one sink is attached to Boost.Log core.
-  ndn::util::Logging::setDestination(std::clog);
-}
-
-LoggerFactory::~LoggerFactory()
-{
-  ndn::util::Logging::flush();
-}
-
-void
-LoggerFactory::setConfigFile(ConfigFile& config)
-{
-  config.addSectionHandler("log", bind(&LoggerFactory::onConfig, this, _1, _2, _3));
-}
-
-LogLevel
-LoggerFactory::parseLevel(const std::string& level)
-{
-  std::string upperLevel = boost::to_upper_copy(level);
-
-  // std::cerr << "parsing level: " << upperLevel << std::endl;;
-  // std::cerr << "# levels: " << m_levelNames.size() << std::endl;
-  // std::cerr << m_levelNames.begin()->first << std::endl;
-
-  LevelMap::const_iterator levelIt = m_levelNames.find(upperLevel);
-  if (levelIt != m_levelNames.end()) {
-    return levelIt->second;
-  }
-  try {
-    uint32_t levelNo = boost::lexical_cast<uint32_t>(level);
-
-    if ((boost::lexical_cast<uint32_t>(LOG_NONE) <= levelNo &&
-         levelNo <= boost::lexical_cast<uint32_t>(LOG_TRACE)) ||
-        levelNo == LOG_ALL) {
-      return static_cast<LogLevel>(levelNo);
-    }
-  }
-  catch (const boost::bad_lexical_cast& error) {
-  }
-
-  BOOST_THROW_EXCEPTION(LoggerFactory::Error("Unsupported logging level \"" + level + "\""));
-}
-
-LogLevel
-LoggerFactory::extractLevel(const ConfigSection& item, const std::string& key)
-{
-  std::string levelString;
-  try {
-    levelString = item.get_value<std::string>();
-  }
-  catch (const boost::property_tree::ptree_error& error) {
-  }
-
-  if (levelString.empty()) {
-    BOOST_THROW_EXCEPTION(LoggerFactory::Error("No logging level found for option \"" + key + "\""));
-  }
-
-  return parseLevel(levelString);
-}
-
-void
-LoggerFactory::onConfig(const ConfigSection& section,
-                        bool isDryRun,
-                        const std::string& filename)
-{
-  // log
-  // {
-  //   ; default_level specifies the logging level for modules
-  //   ; that are not explicitly named. All debugging levels
-  //   ; listed above the selected value are enabled.
-  //
-  //   default_level INFO
-  //
-  //   ; You may also override the default for specific modules:
-  //
-  //   FibManager DEBUG
-  //   Forwarder WARN
-  // }
-
-  if (!isDryRun) {
-    ConfigSection::const_assoc_iterator item = section.find("default_level");
-    if (item != section.not_found()) {
-      LogLevel level = extractLevel(item->second, "default_level");
-      setDefaultLevel(level);
-    }
-    else {
-      setDefaultLevel(LOG_INFO);
-    }
-  }
-
-  for (const auto& i : section) {
-    LogLevel level = extractLevel(i.second, i.first);
-
-    if (i.first == "default_level") {
-      // do nothing
-    }
-    else {
-      std::unique_lock<std::mutex> lock(m_loggersGuard);
-      LoggerMap::iterator loggerIt = m_loggers.find(i.first);
-      if (loggerIt == m_loggers.end()) {
-        lock.unlock();
-        NFD_LOG_DEBUG("Failed to configure logging level for module \"" <<
-                      i.first << "\" (module not found)");
-      }
-      else if (!isDryRun) {
-        loggerIt->second.setLogLevel(level);
-        lock.unlock();
-        NFD_LOG_DEBUG("Changing level for module " << i.first << " to " << level);
-      }
-    }
-  }
-}
-
-void
-LoggerFactory::setDefaultLevel(LogLevel level)
-{
-  // std::cerr << "changing to default_level " << level << std::endl;
-  std::lock_guard<std::mutex> lock(m_loggersGuard);
-
-  m_defaultLevel = level;
-  for (auto&& logger : m_loggers) {
-    // std::cerr << "changing " << i->first << " to default " << m_defaultLevel << std::endl;
-    logger.second.setLogLevel(m_defaultLevel);
-  }
-}
-
-void
-LoggerFactory::flushBackend()
-{
-  ndn::util::Logging::flush();
-}
-
-Logger&
-LoggerFactory::create(const std::string& moduleName)
-{
-  return LoggerFactory::getInstance().createLogger(moduleName);
-}
-
-Logger&
-LoggerFactory::createLogger(const std::string& moduleName)
-{
-  // std::cerr << "creating logger for " << moduleName
-  //           << " with level " << m_defaultLevel << std::endl;
-
-  std::lock_guard<std::mutex> lock(m_loggersGuard);
-
-  std::pair<LoggerMap::iterator, bool> loggerIt =
-    m_loggers.insert(NameAndLogger(moduleName, Logger(moduleName, m_defaultLevel)));
-
-  return loggerIt.first->second;
-}
-
-std::list<std::string>
-LoggerFactory::getModules() const
-{
-  std::lock_guard<std::mutex> lock(m_loggersGuard);
-
-  std::list<std::string> modules;
-  for (const auto& loggerName : m_loggers | boost::adaptors::map_keys) {
-    modules.push_back(loggerName);
-  }
-
-  return modules;
-}
-
-} // namespace nfd
diff --git a/core/logger-factory.hpp b/core/logger-factory.hpp
deleted file mode 100644
index 5cafc64..0000000
--- a/core/logger-factory.hpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_CORE_LOGGER_FACTORY_HPP
-#define NFD_CORE_LOGGER_FACTORY_HPP
-
-#include "common.hpp"
-
-#ifdef HAVE_CUSTOM_LOGGER
-#include "custom-logger-factory.hpp"
-#else
-
-#include "config-file.hpp"
-#include "logger.hpp"
-
-#include <mutex>
-
-namespace nfd {
-
-class LoggerFactory : noncopyable
-{
-public:
-
-  class Error : public std::runtime_error
-  {
-  public:
-    explicit
-    Error(const std::string& error)
-      : std::runtime_error(error)
-    {
-    }
-  };
-
-  static LoggerFactory&
-  getInstance();
-
-  void
-  setConfigFile(ConfigFile& config);
-
-  void
-  onConfig(const ConfigSection& section, bool isDryRun, const std::string& filename);
-
-  std::list<std::string>
-  getModules() const;
-
-  static Logger&
-  create(const std::string& moduleName);
-
-
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-
-  // these methods are used during unit-testing
-
-  LogLevel
-  getDefaultLevel() const;
-
-  void
-  setDefaultLevel(LogLevel level);
-
-  void
-  flushBackend();
-
-private:
-
-  LoggerFactory();
-
-  ~LoggerFactory();
-
-  Logger&
-  createLogger(const std::string& moduleName);
-
-  LogLevel
-  parseLevel(const std::string& level);
-
-  LogLevel
-  extractLevel(const ConfigSection& item, const std::string& key);
-
-private:
-
-  typedef std::map<std::string, LogLevel> LevelMap;
-  typedef std::pair<std::string, LogLevel> NameAndLevel;
-
-  LevelMap m_levelNames;
-
-  typedef std::map<std::string, Logger> LoggerMap;
-  typedef std::pair<std::string, Logger> NameAndLogger;
-
-  LoggerMap m_loggers;
-  mutable std::mutex m_loggersGuard;
-
-  LogLevel m_defaultLevel;
-};
-
-inline LogLevel
-LoggerFactory::getDefaultLevel() const
-{
-  return m_defaultLevel;
-}
-
-} // namespace nfd
-
-#endif // HAVE_CUSTOM_LOGGER
-
-#endif // NFD_CORE_LOGGER_FACTORY_HPP
diff --git a/core/logger.cpp b/core/logger.cpp
deleted file mode 100644
index 7803dfc..0000000
--- a/core/logger.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "logger.hpp"
-
-#ifdef HAVE_CUSTOM_LOGGER
-#error "This file should not be compiled when custom logger is used"
-#endif
-
-#include <ndn-cxx/util/time.hpp>
-#include <cinttypes>
-#include <stdio.h>
-#include <type_traits>
-
-namespace nfd {
-
-Logger::Logger(const std::string& name, LogLevel level)
-  : m_moduleName(name)
-  , m_enabledLogLevel(level)
-{
-}
-
-std::ostream&
-operator<<(std::ostream& os, const LoggerTimestamp&)
-{
-  using namespace ndn::time;
-
-  static const microseconds::rep ONE_SECOND = 1000000;
-  microseconds::rep microsecondsSinceEpoch = duration_cast<microseconds>(
-    system_clock::now().time_since_epoch()).count();
-
-  // 10 (whole seconds) + '.' + 6 (fraction) + '\0'
-  char buffer[10 + 1 + 6 + 1];
-  BOOST_ASSERT_MSG(microsecondsSinceEpoch / ONE_SECOND <= 9999999999L,
-                   "whole seconds cannot fit in 10 characters");
-
-  static_assert(std::is_same<microseconds::rep, int_least64_t>::value,
-                "PRIdLEAST64 is incompatible with microseconds::rep");
-  // - std::snprintf not found in some environments
-  //   http://redmine.named-data.net/issues/2299 for more information
-  snprintf(buffer, sizeof(buffer), "%" PRIdLEAST64 ".%06" PRIdLEAST64,
-           microsecondsSinceEpoch / ONE_SECOND,
-           microsecondsSinceEpoch % ONE_SECOND);
-
-  return os << buffer;
-}
-
-} // namespace nfd
diff --git a/core/logger.hpp b/core/logger.hpp
index 24ec63c..1cc0795 100644
--- a/core/logger.hpp
+++ b/core/logger.hpp
@@ -27,145 +27,37 @@
 #define NFD_CORE_LOGGER_HPP
 
 #include "common.hpp"
-
-#ifdef HAVE_CUSTOM_LOGGER
-#include "custom-logger.hpp"
-#else
-#include <boost/log/common.hpp>
-#include <boost/log/sources/logger.hpp>
+#include "ns3/log.h"
 
 namespace nfd {
 
-/** \brief indicates a log level
- *  \note This type is internal. Logger should be accessed through NFD_LOG_* macros.
- */
-enum LogLevel {
-  LOG_FATAL          = -1, // fatal (will be logged unconditionally)
-  LOG_NONE           = 0, // no messages
-  LOG_ERROR          = 1, // serious error messages
-  LOG_WARN           = 2, // warning messages
-  LOG_INFO           = 3, // informational messages
-  LOG_DEBUG          = 4, // debug messages
-  LOG_TRACE          = 5, // trace messages (most verbose)
-  LOG_ALL            = 255 // all messages
-};
-
-/** \brief provides logging for a module
- *  \note This type is internal. Logger should be accessed through NFD_LOG_* macros.
- *  \note This type is copyable because logger can be declared as a field of
- *        (usually template) classes, and shouldn't prevent those classes to be copyable.
- */
-class Logger
-{
-public:
-  Logger(const std::string& name, LogLevel level);
-
-  bool
-  isEnabled(LogLevel level) const
-  {
-    return m_enabledLogLevel >= level;
-  }
-
-  void
-  setLogLevel(LogLevel level)
-  {
-    m_enabledLogLevel = level;
-  }
-
-  const std::string&
-  getName() const
-  {
-    return m_moduleName;
-  }
-
-  void
-  setName(const std::string& name)
-  {
-    m_moduleName = name;
-  }
-
-public:
-  boost::log::sources::logger boostLogger;
-
-private:
-  std::string m_moduleName;
-  LogLevel    m_enabledLogLevel;
-};
-
-inline std::ostream&
-operator<<(std::ostream& output, const Logger& logger)
-{
-  output << logger.getName();
-  return output;
-}
-
-/**
- * \brief a tag that writes a timestamp upon stream output
- */
-struct LoggerTimestamp
-{
-};
-
-/**
- * \brief write a timestamp to \p os
- * \note This function is thread-safe.
- */
-std::ostream&
-operator<<(std::ostream& os, const LoggerTimestamp&);
-
-} // namespace nfd
-
-#include "core/logger-factory.hpp"
-
-namespace nfd {
-
-#define NFD_LOG_INIT(name) \
-static ::nfd::Logger& g_logger = ::nfd::LoggerFactory::create(name)
+#define NFD_LOG_INIT(name) NS_LOG_COMPONENT_DEFINE("nfd." name);
 
 #define NFD_LOG_INCLASS_DECLARE() \
-static ::nfd::Logger& g_logger
+static ns3::LogComponent g_log
 
 #define NFD_LOG_INCLASS_DEFINE(cls, name) \
-::nfd::Logger& cls::g_logger = ::nfd::LoggerFactory::create(name)
+ns3::LogComponent cls::g_log = ns3::LogComponent ("nfd." name, __FILE__)
 
 #define NFD_LOG_INCLASS_TEMPLATE_DEFINE(cls, name) \
 template<class T>                                  \
-::nfd::Logger& cls<T>::g_logger = ::nfd::LoggerFactory::create(name)
+ns3::LogComponent cls<T>::g_log = ns3::LogComponent ("nfd." name, __FILE__)
 
 #define NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(cls, specialization, name) \
 template<>                                                                        \
-::nfd::Logger& cls<specialization>::g_logger = ::nfd::LoggerFactory::create(name)
+ns3::LogComponent cls<specialization>::g_log = ns3::LogComponent ("nfd." name, __FILE__)
 
 #define NFD_LOG_INCLASS_2TEMPLATE_SPECIALIZATION_DEFINE(cls, s1, s2, name) \
 template<>                                                                 \
-::nfd::Logger& cls<s1, s2>::g_logger = ::nfd::LoggerFactory::create(name)
+s3::LogComponent cls<s1, s2>::g_log = ns3::LogComponent ("nfd." name, __FILE__)
 
-#if (BOOST_VERSION >= 105900) && (BOOST_VERSION < 106000)
-// workaround Boost bug 11549
-#define NFD_BOOST_LOG(x) BOOST_LOG(x) << ""
-#else
-#define NFD_BOOST_LOG(x) BOOST_LOG(x)
-#endif
-
-#define NFD_LOG_LINE(msg, expression) \
-::nfd::LoggerTimestamp{} << " "#msg": " << "[" << g_logger  << "] " << expression
-
-#define NFD_LOG(level, msg, expression)                                 \
-  do {                                                                  \
-    if (g_logger.isEnabled(::nfd::LOG_##level)) {                       \
-      NFD_BOOST_LOG(g_logger.boostLogger) << NFD_LOG_LINE(msg, expression); \
-    }                                                                   \
-  } while (false)
-
-#define NFD_LOG_TRACE(expression) NFD_LOG(TRACE, TRACE,   expression)
-#define NFD_LOG_DEBUG(expression) NFD_LOG(DEBUG, DEBUG,   expression)
-#define NFD_LOG_INFO(expression)  NFD_LOG(INFO,  INFO,    expression)
-#define NFD_LOG_WARN(expression)  NFD_LOG(WARN,  WARNING, expression)
-#define NFD_LOG_ERROR(expression) NFD_LOG(ERROR, ERROR,   expression)
-#define NFD_LOG_FATAL(expression) NFD_LOG(FATAL, FATAL,   expression)
+#define NFD_LOG_TRACE(expression) NS_LOG_LOGIC(expression)
+#define NFD_LOG_DEBUG(expression) NS_LOG_DEBUG(expression)
+#define NFD_LOG_INFO(expression) NS_LOG_INFO(expression)
+#define NFD_LOG_ERROR(expression) NS_LOG_ERROR(expression)
+#define NFD_LOG_WARN(expression) NS_LOG_WARN(expression)
+#define NFD_LOG_FATAL(expression) NS_LOG_FATAL(expression)
 
 } // namespace nfd
 
-#endif // HAVE_CUSTOM_LOGGER
-
 #endif // NFD_CORE_LOGGER_HPP
