proxygen
|
#include <Logger.h>
Public Member Functions | |
Logger (folly::StringPiece name) | |
Logger (LogCategory *cat) | |
Logger (LoggerDB *db, folly::StringPiece name) | |
LogCategory * | getCategory () const |
Private Attributes | |
LogCategory *const | category_ {nullptr} |
Logger is the class you will use to specify the log category when logging messages with FB_LOG().
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.
|
explicit |
Construct a Logger for the given category name.
A LogCategory object for this category will be created if one does not already exist.
Definition at line 28 of file Logger.cpp.
References folly::LoggerDB::get(), and folly::LoggerDB::getCategory().
|
explicit |
Construct a Logger pointing to an existing LogCategory object.
Definition at line 30 of file Logger.cpp.
folly::Logger::Logger | ( | LoggerDB * | db, |
folly::StringPiece | name | ||
) |
Construct a Logger for a specific LoggerDB object, rather than the main singleton.
This is primarily intended for use in unit tests.
Definition at line 32 of file Logger.cpp.
References folly::LoggerDB::getCategory().
|
inline |
|
private |
Definition at line 188 of file Logger.h.
Referenced by getCategory().