core: change NFD_LOG_* macros to use std::clog
This change makes all logging output BUFFERED
refs: #1440
Change-Id: Ief60c43b532e4524a70aad2bf15aa06490847535
diff --git a/daemon/core/logger.hpp b/daemon/core/logger.hpp
index e0241ff..0b545e0 100644
--- a/daemon/core/logger.hpp
+++ b/daemon/core/logger.hpp
@@ -135,7 +135,7 @@
#define NFD_LOG(level, expression) \
do { \
if (g_logger.isEnabled(::nfd::LOG_##level)) \
- std::cerr << ::nfd::Logger::now() << " "#level": " \
+ std::clog << ::nfd::Logger::now() << " "#level": " \
<< "[" << g_logger << "] " << expression << "\n"; \
} while (false)
@@ -148,13 +148,13 @@
#define NFD_LOG_WARN(expression) \
do { \
if (g_logger.isEnabled(::nfd::LOG_WARN)) \
- std::cerr << ::nfd::Logger::now() << " WARNING: " \
+ std::clog << ::nfd::Logger::now() << " WARNING: " \
<< "[" << g_logger << "] " << expression << "\n"; \
} while (false)
#define NFD_LOG_FATAL(expression) \
do { \
- std::cerr << ::nfd::Logger::now() << " FATAL: " \
+ std::clog << ::nfd::Logger::now() << " FATAL: " \
<< "[" << g_logger << "] " << expression << "\n"; \
} while (false)