proxygen
folly::XlogCategoryInfo< IsInHeaderFile > Class Template Reference

#include <LogStreamProcessor.h>

Public Member Functions

bool isInitialized () const
 
LogCategoryinit (folly::StringPiece categoryName, bool isOverridden)
 
LogCategorygetCategory (XlogFileScopeInfo *)
 
XlogCategoryInfo< IsInHeaderFile > * getInfo (XlogFileScopeInfo *)
 

Private Attributes

std::atomic< bool > isInitialized_
 
LogCategorycategory_
 

Detailed Description

template<bool IsInHeaderFile>
class folly::XlogCategoryInfo< IsInHeaderFile >

Definition at line 74 of file LogStreamProcessor.h.

Member Function Documentation

template<bool IsInHeaderFile>
LogCategory* folly::XlogCategoryInfo< IsInHeaderFile >::getCategory ( XlogFileScopeInfo )
inline

Definition at line 427 of file xlog.h.

Referenced by folly::LogStreamProcessor::LogStreamProcessor().

427  {
428  return category_;
429  }
LogCategory * category_
Definition: xlog.h:442
template<bool IsInHeaderFile>
XlogCategoryInfo<IsInHeaderFile>* folly::XlogCategoryInfo< IsInHeaderFile >::getInfo ( XlogFileScopeInfo )
inline

Get a pointer to pass into the LogStreamProcessor constructor, so that it is able to look up the LogCategory information.

Definition at line 435 of file xlog.h.

435  {
436  return this;
437  }
template<bool IsInHeaderFile>
LogCategory * folly::XlogCategoryInfo< IsInHeaderFile >::init ( folly::StringPiece  categoryName,
bool  isOverridden 
)

Definition at line 86 of file xlog.cpp.

References folly::LoggerDB::get(), folly::getXlogCategoryNameForFile(), folly::XlogLevelInfo< IsInHeaderFile >::loadLevelFull(), folly::UNINITIALIZED, UNLIKELY, folly::LoggerDB::xlogInit(), and folly::LoggerDB::xlogInitCategory().

Referenced by folly::LogStreamProcessor::LogStreamProcessor().

88  {
90  isOverridden ? categoryName : getXlogCategoryNameForFile(categoryName),
91  &category_,
93 }
LogCategory * category_
Definition: xlog.h:442
LogCategory * xlogInitCategory(folly::StringPiece categoryName, LogCategory **xlogCategory, std::atomic< bool > *isInitialized)
Definition: LoggerDB.cpp:623
StringPiece getXlogCategoryNameForFile(StringPiece filename)
Definition: xlog.cpp:57
std::atomic< bool > isInitialized_
Definition: xlog.h:441
static LoggerDB & get()
Definition: LoggerDB.cpp:112
template<bool IsInHeaderFile>
bool folly::XlogCategoryInfo< IsInHeaderFile >::isInitialized ( ) const
inline

Definition at line 421 of file xlog.h.

References folly::init().

Referenced by folly::LogStreamProcessor::LogStreamProcessor().

421  {
422  return isInitialized_.load(std::memory_order_acquire);
423  }
std::atomic< bool > isInitialized_
Definition: xlog.h:441

Member Data Documentation

template<bool IsInHeaderFile>
LogCategory* folly::XlogCategoryInfo< IsInHeaderFile >::category_
private

Definition at line 442 of file xlog.h.

template<bool IsInHeaderFile>
std::atomic<bool> folly::XlogCategoryInfo< IsInHeaderFile >::isInitialized_
private

Definition at line 441 of file xlog.h.


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