core: reimplement logging using ndn-cxx's facility
Change-Id: Ifc7c5d70a61ad405dc1f1adfa522a2c0ad1586ab
Refs: #4580
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index 2b2cc29..0b375ad 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -95,7 +95,7 @@
typename protocol::socket m_socket;
typename protocol::endpoint m_sender;
- NFD_LOG_INCLASS_DECLARE();
+ NFD_LOG_MEMBER_DECL();
private:
std::array<uint8_t, ndn::MAX_NDN_PACKET_SIZE> m_receiveBuffer;
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index cf60527..3791d44 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -35,7 +35,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("EthernetChannel");
+NFD_LOG_INIT(EthernetChannel);
EthernetChannel::EthernetChannel(shared_ptr<const ndn::net::NetworkInterface> localEndpoint,
time::nanoseconds idleTimeout)
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 2c6c39c..d921855 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -33,7 +33,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("EthernetFactory");
+NFD_LOG_INIT(EthernetFactory);
NFD_REGISTER_PROTOCOL_FACTORY(EthernetFactory);
const std::string&
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 5a8f91a..a7e8907 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -35,7 +35,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("EthernetTransport");
+NFD_LOG_INIT(EthernetTransport);
EthernetTransport::EthernetTransport(const ndn::net::NetworkInterface& localEndpoint,
const ethernet::Address& remoteEndpoint)
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index ebdce9c..1d2db37 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.cpp
@@ -31,7 +31,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("FaceSystem");
+NFD_LOG_INIT(FaceSystem);
FaceSystem::FaceSystem(FaceTable& faceTable, shared_ptr<ndn::net::NetworkMonitor> netmon)
: m_faceTable(faceTable)
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index d7ebc7c..5122755 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.cpp
@@ -32,7 +32,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("GenericLinkService");
+NFD_LOG_INIT(GenericLinkService);
constexpr uint32_t DEFAULT_CONGESTION_THRESHOLD_DIVISOR = 2;
diff --git a/daemon/face/internal-transport.cpp b/daemon/face/internal-transport.cpp
index 5b82c20..7e7ac3e 100644
--- a/daemon/face/internal-transport.cpp
+++ b/daemon/face/internal-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,11 +29,11 @@
namespace nfd {
namespace face {
-NFD_LOG_INCLASS_DEFINE(InternalForwarderTransport, "InternalForwarderTransport");
+NFD_LOG_MEMBER_INIT(InternalForwarderTransport, InternalForwarderTransport);
+NFD_LOG_MEMBER_INIT(InternalClientTransport, InternalClientTransport);
-InternalForwarderTransport::InternalForwarderTransport(
- const FaceUri& localUri, const FaceUri& remoteUri,
- ndn::nfd::FaceScope scope, ndn::nfd::LinkType linkType)
+InternalForwarderTransport::InternalForwarderTransport(const FaceUri& localUri, const FaceUri& remoteUri,
+ ndn::nfd::FaceScope scope, ndn::nfd::LinkType linkType)
{
this->setLocalUri(localUri);
this->setRemoteUri(remoteUri);
@@ -71,8 +71,6 @@
this->setState(TransportState::CLOSED);
}
-NFD_LOG_INCLASS_DEFINE(InternalClientTransport, "InternalClientTransport");
-
static void
asyncReceive(InternalTransportBase* recipient, const Block& packet)
{
diff --git a/daemon/face/internal-transport.hpp b/daemon/face/internal-transport.hpp
index 67a53b3..9f834d7 100644
--- a/daemon/face/internal-transport.hpp
+++ b/daemon/face/internal-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -27,6 +27,7 @@
#define NFD_DAEMON_FACE_INTERNAL_TRANSPORT_HPP
#include "transport.hpp"
+
#include <ndn-cxx/transport/transport.hpp>
namespace nfd {
@@ -73,7 +74,7 @@
doSend(Packet&& packet) override;
private:
- NFD_LOG_INCLASS_DECLARE();
+ NFD_LOG_MEMBER_DECL();
};
/** \brief implements a client-side transport that can be paired with another
@@ -117,7 +118,7 @@
send(const Block& header, const Block& payload) override;
private:
- NFD_LOG_INCLASS_DECLARE();
+ NFD_LOG_MEMBER_DECL();
signal::ScopedConnection m_fwToClientTransmitConn;
signal::ScopedConnection m_clientToFwTransmitConn;
diff --git a/daemon/face/link-service.cpp b/daemon/face/link-service.cpp
index 9b05c2a..c5dcdfc 100644
--- a/daemon/face/link-service.cpp
+++ b/daemon/face/link-service.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("LinkService");
+NFD_LOG_INIT(LinkService);
LinkService::LinkService()
: m_face(nullptr)
diff --git a/daemon/face/lp-fragmenter.cpp b/daemon/face/lp-fragmenter.cpp
index b54f7d5..1928bf5 100644
--- a/daemon/face/lp-fragmenter.cpp
+++ b/daemon/face/lp-fragmenter.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,12 +25,13 @@
#include "lp-fragmenter.hpp"
#include "link-service.hpp"
+
#include <ndn-cxx/encoding/tlv.hpp>
namespace nfd {
namespace face {
-NFD_LOG_INIT("LpFragmenter");
+NFD_LOG_INIT(LpFragmenter);
static_assert(lp::tlv::LpPacket < 253, "LpPacket TLV-TYPE must fit in 1 octet");
static_assert(lp::tlv::Sequence < 253, "Sequence TLV-TYPE must fit in 1 octet");
diff --git a/daemon/face/lp-fragmenter.hpp b/daemon/face/lp-fragmenter.hpp
index 8275d0f..40d32cb 100644
--- a/daemon/face/lp-fragmenter.hpp
+++ b/daemon/face/lp-fragmenter.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,6 +26,7 @@
#ifndef NFD_DAEMON_FACE_LP_FRAGMENTER_HPP
#define NFD_DAEMON_FACE_LP_FRAGMENTER_HPP
+#include "core/common.hpp"
#include "face-log.hpp"
#include <ndn-cxx/lp/packet.hpp>
@@ -36,7 +37,7 @@
class LinkService;
/** \brief fragments network-layer packets into NDNLPv2 link-layer packets
- * \sa http://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
*/
class LpFragmenter
{
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index 88ef1c1..a6d1c60 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -25,12 +25,13 @@
#include "lp-reassembler.hpp"
#include "link-service.hpp"
+
#include <numeric>
namespace nfd {
namespace face {
-NFD_LOG_INIT("LpReassembler");
+NFD_LOG_INIT(LpReassembler);
LpReassembler::Options::Options()
: nMaxFragments(400)
diff --git a/daemon/face/multicast-ethernet-transport.cpp b/daemon/face/multicast-ethernet-transport.cpp
index b7bbdc2..91c25d4 100644
--- a/daemon/face/multicast-ethernet-transport.cpp
+++ b/daemon/face/multicast-ethernet-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,7 +46,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("MulticastEthernetTransport");
+NFD_LOG_INIT(MulticastEthernetTransport);
MulticastEthernetTransport::MulticastEthernetTransport(const ndn::net::NetworkInterface& localEndpoint,
const ethernet::Address& mcastAddress,
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index 80f86ae..3574158 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -40,8 +40,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INCLASS_2TEMPLATE_SPECIALIZATION_DEFINE(DatagramTransport, MulticastUdpTransport::protocol,
- Multicast, "MulticastUdpTransport");
+NFD_LOG_MEMBER_INIT_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Multicast>), MulticastUdpTransport);
MulticastUdpTransport::MulticastUdpTransport(const protocol::endpoint& multicastGroup,
protocol::socket&& recvSocket,
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index ba7bcbe..72498d0 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -33,6 +33,8 @@
namespace nfd {
namespace face {
+NFD_LOG_MEMBER_DECL_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Multicast>));
+
// Explicit specialization of makeEndpointId for the UDP multicast case.
// Note that this "shall be declared before the first use of the specialization
// that would cause an implicit instantiation to take place, in every translation
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index 0adbf26..d70e4f6 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -97,7 +97,7 @@
protected:
typename protocol::socket m_socket;
- NFD_LOG_INCLASS_DECLARE();
+ NFD_LOG_MEMBER_DECL();
private:
uint8_t m_receiveBuffer[ndn::MAX_NDN_PACKET_SIZE];
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 058bbe5..968c6a7 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -31,7 +31,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("TcpChannel");
+NFD_LOG_INIT(TcpChannel);
namespace ip = boost::asio::ip;
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 1831467..02d5f33 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -32,7 +32,7 @@
namespace ip = boost::asio::ip;
-NFD_LOG_INIT("TcpFactory");
+NFD_LOG_INIT(TcpFactory);
NFD_REGISTER_PROTOCOL_FACTORY(TcpFactory);
const std::string&
diff --git a/daemon/face/tcp-transport.cpp b/daemon/face/tcp-transport.cpp
index eef8570..ad1be5d 100644
--- a/daemon/face/tcp-transport.cpp
+++ b/daemon/face/tcp-transport.cpp
@@ -33,7 +33,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(StreamTransport, TcpTransport::protocol, "TcpTransport");
+NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>, TcpTransport);
time::milliseconds TcpTransport::s_initialReconnectWait = time::seconds(1);
time::milliseconds TcpTransport::s_maxReconnectWait = time::minutes(5);
diff --git a/daemon/face/tcp-transport.hpp b/daemon/face/tcp-transport.hpp
index 9367ffe..adf5085 100644
--- a/daemon/face/tcp-transport.hpp
+++ b/daemon/face/tcp-transport.hpp
@@ -32,6 +32,8 @@
namespace nfd {
namespace face {
+NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>);
+
/**
* \brief A Transport that communicates on a connected TCP socket
*
diff --git a/daemon/face/transport.cpp b/daemon/face/transport.cpp
index 863b2b3..f615a10 100644
--- a/daemon/face/transport.cpp
+++ b/daemon/face/transport.cpp
@@ -29,7 +29,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("Transport");
+NFD_LOG_INIT(Transport);
std::ostream&
operator<<(std::ostream& os, TransportState state)
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 209aa70..3d6e6b8 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -31,7 +31,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("UdpChannel");
+NFD_LOG_INIT(UdpChannel);
namespace ip = boost::asio::ip;
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 377d3b1..2b7b3c8 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -38,7 +38,7 @@
namespace ip = boost::asio::ip;
namespace net = ndn::net;
-NFD_LOG_INIT("UdpFactory");
+NFD_LOG_INIT(UdpFactory);
NFD_REGISTER_PROTOCOL_FACTORY(UdpFactory);
const std::string&
diff --git a/daemon/face/unicast-ethernet-transport.cpp b/daemon/face/unicast-ethernet-transport.cpp
index e2e56d0..e28fa93 100644
--- a/daemon/face/unicast-ethernet-transport.cpp
+++ b/daemon/face/unicast-ethernet-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California,
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("UnicastEthernetTransport");
+NFD_LOG_INIT(UnicastEthernetTransport);
UnicastEthernetTransport::UnicastEthernetTransport(const ndn::net::NetworkInterface& localEndpoint,
const ethernet::Address& remoteEndpoint,
diff --git a/daemon/face/unicast-udp-transport.cpp b/daemon/face/unicast-udp-transport.cpp
index 4f8a8f7..8e3d7d8 100644
--- a/daemon/face/unicast-udp-transport.cpp
+++ b/daemon/face/unicast-udp-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -36,8 +36,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(DatagramTransport, UnicastUdpTransport::protocol,
- "UnicastUdpTransport");
+NFD_LOG_MEMBER_INIT_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Unicast>), UnicastUdpTransport);
UnicastUdpTransport::UnicastUdpTransport(protocol::socket&& socket,
ndn::nfd::FacePersistency persistency,
diff --git a/daemon/face/unicast-udp-transport.hpp b/daemon/face/unicast-udp-transport.hpp
index 6136746..b1eb672 100644
--- a/daemon/face/unicast-udp-transport.hpp
+++ b/daemon/face/unicast-udp-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,6 +32,8 @@
namespace nfd {
namespace face {
+NFD_LOG_MEMBER_DECL_SPECIALIZED((DatagramTransport<boost::asio::ip::udp, Unicast>));
+
/**
* \brief A Transport that communicates on a unicast UDP socket
*/
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index fcc8fe7..a127c84 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.cpp
@@ -34,7 +34,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("UnixStreamChannel");
+NFD_LOG_INIT(UnixStreamChannel);
UnixStreamChannel::UnixStreamChannel(const unix_stream::Endpoint& endpoint,
bool wantCongestionMarking)
diff --git a/daemon/face/unix-stream-factory.cpp b/daemon/face/unix-stream-factory.cpp
index 439eff4..2d8567a 100644
--- a/daemon/face/unix-stream-factory.cpp
+++ b/daemon/face/unix-stream-factory.cpp
@@ -30,7 +30,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("UnixStreamFactory");
+NFD_LOG_INIT(UnixStreamFactory);
NFD_REGISTER_PROTOCOL_FACTORY(UnixStreamFactory);
const std::string&
diff --git a/daemon/face/unix-stream-transport.cpp b/daemon/face/unix-stream-transport.cpp
index cbbda54..b1987a5 100644
--- a/daemon/face/unix-stream-transport.cpp
+++ b/daemon/face/unix-stream-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(StreamTransport, UnixStreamTransport::protocol,
- "UnixStreamTransport");
+NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::local::stream_protocol>, UnixStreamTransport);
UnixStreamTransport::UnixStreamTransport(protocol::socket&& socket)
: StreamTransport(std::move(socket))
diff --git a/daemon/face/unix-stream-transport.hpp b/daemon/face/unix-stream-transport.hpp
index 510350e..a52567a 100644
--- a/daemon/face/unix-stream-transport.hpp
+++ b/daemon/face/unix-stream-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -35,6 +35,8 @@
namespace nfd {
namespace face {
+NFD_LOG_MEMBER_DECL_SPECIALIZED(StreamTransport<boost::asio::local::stream_protocol>);
+
/**
* \brief A Transport that communicates on a stream-oriented Unix domain socket
*/
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index d26a0b5..2ac9384 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -31,7 +31,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("WebSocketChannel");
+NFD_LOG_INIT(WebSocketChannel);
WebSocketChannel::WebSocketChannel(const websocket::Endpoint& localEndpoint)
: m_localEndpoint(localEndpoint)
diff --git a/daemon/face/websocket-factory.cpp b/daemon/face/websocket-factory.cpp
index c61d900..11921cc 100644
--- a/daemon/face/websocket-factory.cpp
+++ b/daemon/face/websocket-factory.cpp
@@ -30,7 +30,7 @@
namespace ip = boost::asio::ip;
-NFD_LOG_INIT("WebSocketFactory");
+NFD_LOG_INIT(WebSocketFactory);
NFD_REGISTER_PROTOCOL_FACTORY(WebSocketFactory);
const std::string&
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index d4bbbac..97af039 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,7 +28,7 @@
namespace nfd {
namespace face {
-NFD_LOG_INIT("WebSocketTransport");
+NFD_LOG_INIT(WebSocketTransport);
static bool
isLoopback(const boost::asio::ip::address& addr)