From 6283c759b82a2a5764ef77c025aee1d40a77a839 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Tue, 12 Dec 2017 16:30:16 -0800 Subject: [PATCH] logging: minor clean up in Logger.h Summary: Update the comment describing the Logger class, and remove a `clang-format off` since recent versions of `clang-format` appear to do a good job formatting this macro. Reviewed By: yfeldblum Differential Revision: D6525996 fbshipit-source-id: 6abbb3740afb53feb2418ca890cd78af1eb5f7a2 --- folly/experimental/logging/Logger.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/folly/experimental/logging/Logger.h b/folly/experimental/logging/Logger.h index 2701d467..58bd9c74 100644 --- a/folly/experimental/logging/Logger.h +++ b/folly/experimental/logging/Logger.h @@ -27,12 +27,11 @@ * * This macro generally should not be used directly by end users. */ -/* clang-format off */ #define FB_LOG_IMPL(logger, level, type, ...) \ (!(logger).getCategory()->logCheck(level)) \ ? ::folly::logDisabledHelper( \ std::integral_constant{}) \ - : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} & \ + : ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} & \ ::folly::LogStreamProcessor{(logger).getCategory(), \ (level), \ __FILE__, \ @@ -40,7 +39,6 @@ (type), \ ##__VA_ARGS__} \ .stream() -/* clang-format on */ /** * Log a message to the specified logger. @@ -85,12 +83,12 @@ class LoggerDB; class LogMessage; /** - * Logger is the class you will normally use to log messages. + * Logger is the class you will use to specify the log category when logging + * messages with FB_LOG(). * - * The Logger is really just a small wrapper class that contains a pointer - * to the appropriate LogCategory object. It exists to allow for easy static - * initialization of log categories, as well as to provide fast checking of the - * current effective log level. + * Logger is really just a small wrapper class that contains a pointer to the + * appropriate LogCategory object. It primarily exists as syntactic sugar to + * allow for easily looking up LogCategory objects. */ class Logger { public: -- 2.34.1