proxygen
folly::LogCategoryConfig Class Reference

#include <LogCategoryConfig.h>

Public Member Functions

 LogCategoryConfig (LogLevel level=kDefaultLogLevel, bool inheritParentLevel=true)
 
 LogCategoryConfig (LogLevel level, bool inheritParentLevel, std::vector< std::string > handlers)
 
bool operator== (const LogCategoryConfig &other) const
 
bool operator!= (const LogCategoryConfig &other) const
 

Public Attributes

LogLevel level {kDefaultLogLevel}
 
bool inheritParentLevel {true}
 
Optional< std::vector< std::string > > handlers
 

Detailed Description

Configuration for a LogCategory

Definition at line 29 of file LogCategoryConfig.h.

Constructor & Destructor Documentation

folly::LogCategoryConfig::LogCategoryConfig ( LogLevel  level = kDefaultLogLevel,
bool  inheritParentLevel = true 
)
explicit

Definition at line 20 of file LogCategoryConfig.cpp.

References inheritParentLevel.

folly::LogCategoryConfig::LogCategoryConfig ( LogLevel  level,
bool  inheritParentLevel,
std::vector< std::string handlers 
)

Definition at line 23 of file LogCategoryConfig.cpp.

References h, handlers, and inheritParentLevel.

27  : level{l}, inheritParentLevel{inherit}, handlers{h} {}
*than *hazptr_holder h
Definition: Hazptr.h:116

Member Function Documentation

bool folly::LogCategoryConfig::operator!= ( const LogCategoryConfig other) const

Definition at line 35 of file LogCategoryConfig.cpp.

35  {
36  return !(*this == other);
37 }
bool folly::LogCategoryConfig::operator== ( const LogCategoryConfig other) const

Definition at line 29 of file LogCategoryConfig.cpp.

References handlers, inheritParentLevel, and level.

29  {
30  return level == other.level &&
31  inheritParentLevel == other.inheritParentLevel &&
32  handlers == other.handlers;
33 }
Optional< std::vector< std::string > > handlers

Member Data Documentation

Optional<std::vector<std::string> > folly::LogCategoryConfig::handlers

An optional list of LogHandler names to use for this category.

When applying config changes to an existing LogCategory, the existing LogHandler list will be left unchanged if this field is unset.

Definition at line 59 of file LogCategoryConfig.h.

Referenced by LogCategoryConfig(), folly::logConfigToDynamic(), folly::operator<<(), and operator==().

bool folly::LogCategoryConfig::inheritParentLevel {true}

Whether this category should inherit its effective log level from its parent category, if the parent category has a more verbose log level.

Definition at line 51 of file LogCategoryConfig.h.

Referenced by LogCategoryConfig(), folly::logConfigToDynamic(), folly::operator<<(), and operator==().

LogLevel folly::LogCategoryConfig::level {kDefaultLogLevel}

The LogLevel for this category.

Definition at line 45 of file LogCategoryConfig.h.

Referenced by folly::logConfigToDynamic(), folly::operator<<(), and operator==().


The documentation for this class was generated from the following files: