core: Allow customization of Logger and LoggerFactory

Change-Id: I48a8217ab4cfb34ce2993f11a26266723d8d2923
Refs: #2433
diff --git a/core/logger.cpp b/core/logger.cpp
index e971613..5ba8c39 100644
--- a/core/logger.cpp
+++ b/core/logger.cpp
@@ -24,6 +24,11 @@
  */
 
 #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>