logging: implement FATAL and DFATAL log levels
[folly.git] / folly / experimental / logging / Logger.h
index ab9bd24f0950c346704dad1923ba6bb1b1172d31..2fae9e2acfabf1fca49af75d8a9abbe09b9cde7d 100644 (file)
  *
  * This macro generally should not be used directly by end users.
  */
-#define FB_LOG_IMPL(logger, level, type, ...)               \
-  (!(logger).getCategory()->logCheck(level))                \
-      ? (void)0                                             \
-      : ::folly::LogStreamProcessor{(logger).getCategory(), \
-                                    (level),                \
-                                    __FILE__,               \
-                                    __LINE__,               \
-                                    (type),                 \
-                                    ##__VA_ARGS__} &        \
+#define FB_LOG_IMPL(logger, level, type, ...)                  \
+  (!(logger).getCategory()->logCheck(level))                   \
+      ? (void)0                                                \
+      : ::folly::LogStreamProcessorT<::folly::isLogLevelFatal( \
+            level)>{(logger).getCategory(),                    \
+                    (level),                                   \
+                    __FILE__,                                  \
+                    __LINE__,                                  \
+                    (type),                                    \
+                    ##__VA_ARGS__} &                           \
           ::folly::LogStream()
 
 /**