logging: minor clean up in Logger.h
authorAdam Simpkins <simpkins@fb.com>
Wed, 13 Dec 2017 00:30:16 +0000 (16:30 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 13 Dec 2017 00:36:35 +0000 (16:36 -0800)
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

index 2701d467e432f8fd138c558b8593ea13e3fa3443..58bd9c744a3f9750a25f311dcd369d40affc2a7f 100644 (file)
  *
  * 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<bool, ::folly::isLogLevelFatal(level)>{}) \
-      : ::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: