logging: add a LoggerDB::getConfig() method
[folly.git] / folly / experimental / logging / LogCategory.h
index 4779a4728850b1ca383c0ff279bcdc4837b5f242..565373a7d6f2cc716f3df099ca32ad6233e95a74 100644 (file)
@@ -75,6 +75,15 @@ class LogCategory {
         level_.load(std::memory_order_acquire) & ~FLAG_INHERIT);
   }
 
+  /**
+   * Get the log level and inheritance flag.
+   */
+  std::pair<LogLevel, bool> getLevelInfo() const {
+    auto value = level_.load(std::memory_order_acquire);
+    return {static_cast<LogLevel>(value & ~FLAG_INHERIT),
+            bool(value & FLAG_INHERIT)};
+  }
+
   /**
    * Get the effective level for this log category.
    *