diff --git a/daemon/face/websocket-face.cpp b/daemon/face/websocket-face.cpp
index 4875f6c..27a8f57 100644
--- a/daemon/face/websocket-face.cpp
+++ b/daemon/face/websocket-face.cpp
@@ -37,6 +37,7 @@
   , m_server(server)
   , m_closed(false)
 {
+  NFD_LOG_FACE_INFO("Creating face");
   this->setOnDemand(true);
 }
 
@@ -46,6 +47,8 @@
   if (m_closed)
     return;
 
+  NFD_LOG_FACE_TRACE(__func__);
+
   this->emitSignal(onSendInterest, interest);
 
   const Block& payload = interest.wireEncode();
@@ -56,7 +59,7 @@
                   websocketpp::frame::opcode::binary);
   }
   catch (const websocketpp::lib::error_code& e) {
-    NFD_LOG_WARN("Failed to send Interest: " << e << " (" << e.message() << ")");
+    NFD_LOG_FACE_WARN("Failed to send Interest: " << e << " (" << e.message() << ")");
   }
 }
 
@@ -66,6 +69,8 @@
   if (m_closed)
     return;
 
+  NFD_LOG_FACE_TRACE(__func__);
+
   this->emitSignal(onSendData, data);
 
   const Block& payload = data.wireEncode();
@@ -76,22 +81,24 @@
                   websocketpp::frame::opcode::binary);
   }
   catch (const websocketpp::lib::error_code& e) {
-    NFD_LOG_WARN("Failed to send Data: " << e << " (" << e.message() << ")");
+    NFD_LOG_FACE_WARN("Failed to send Data: " << e << " (" << e.message() << ")");
   }
 }
 
 void
 WebSocketFace::close()
 {
-  if (m_closed == false)
-    {
-      m_closed = true;
-      scheduler::cancel(m_pingEventId);
-      websocketpp::lib::error_code ecode;
-      m_server.close(m_handle, websocketpp::close::status::normal, "closed by nfd", ecode);
+  if (m_closed)
+    return;
 
-      fail("Face closed");
-    }
+  NFD_LOG_FACE_INFO("Closing face");
+
+  m_closed = true;
+  scheduler::cancel(m_pingEventId);
+  websocketpp::lib::error_code ecode;
+  m_server.close(m_handle, websocketpp::close::status::normal, "closed by nfd", ecode);
+
+  fail("Face closed");
 }
 
 void
@@ -100,13 +107,11 @@
   // Copy message into Face internal buffer
   if (msg.size() > ndn::MAX_NDN_PACKET_SIZE)
     {
-      NFD_LOG_WARN("[id:" << this->getId()
-                   << "] Received WebSocket message is too big (" << msg.size() << " bytes)");
+      NFD_LOG_FACE_WARN("Received WebSocket message is too big (" << msg.size() << " bytes)");
       return;
     }
 
-  NFD_LOG_TRACE("[id:" << this->getId()
-                << "] Received: " << msg.size() << " bytes");
+  NFD_LOG_FACE_TRACE("Received: " << msg.size() << " bytes");
   this->getMutableCounters().getNInBytes() += msg.size();
 
   // Try to parse message data
@@ -115,15 +120,13 @@
                                 msg.size(), element);
   if (!isOk)
     {
-      NFD_LOG_WARN("[id:" << this->getId()
-                   << "] Received block is invalid or too large to process");
+      NFD_LOG_FACE_WARN("Received block is invalid or too large to process");
       return;
     }
 
   if (!this->decodeAndDispatchInput(element))
     {
-      NFD_LOG_WARN("[id:" << this->getId()
-                   << "] Received unrecognized TLV block of type " << element.type());
+      NFD_LOG_FACE_WARN("Received unrecognized TLV block of type " << element.type());
       // ignore unknown packet and proceed
     }
 }
