#include <folly/logging/LoggerDB.h>
#include <set>
#include <folly/CPortability.h>
#include <folly/Conv.h>
#include <folly/FileUtil.h>
#include <folly/String.h>
#include <folly/logging/LogCategory.h>
#include <folly/logging/LogConfig.h>
#include <folly/logging/LogHandler.h>
#include <folly/logging/LogHandlerFactory.h>
#include <folly/logging/LogLevel.h>
#include <folly/logging/Logger.h>
#include <folly/logging/RateLimiter.h>
#include <folly/logging/StreamHandlerFactory.h>
string;
namespace folly {
FOLLY_ATTR_WEAK void initializeLoggerDB(LoggerDB& db) { … }
LoggerDB::LoggerDB() { … }
LoggerDB::LoggerDB(TestConstructorArg) : … { … }
LoggerDB::~LoggerDB() = default;
LogCategory* LoggerDB::getCategory(StringPiece name) { … }
LogCategory* FOLLY_NULLABLE LoggerDB::getCategoryOrNull(StringPiece name) { … }
void LoggerDB::setLevel(folly::StringPiece name, LogLevel level, bool inherit) { … }
void LoggerDB::setLevel(LogCategory* category, LogLevel level, bool inherit) { … }
LogConfig LoggerDB::getConfig() const { … }
LogConfig LoggerDB::getFullConfig() const { … }
LogConfig LoggerDB::getConfigImpl(bool includeAllCategories) const { … }
void LoggerDB::startConfigUpdate(
const Synchronized<HandlerInfo>::LockedPtr& handlerInfo,
const LogConfig& config,
NewHandlerMap* handlers,
OldToNewHandlerMap* oldToNewHandlerMap) { … }
void LoggerDB::finishConfigUpdate(
const Synchronized<HandlerInfo>::LockedPtr& handlerInfo,
NewHandlerMap* handlers,
OldToNewHandlerMap* oldToNewHandlerMap) { … }
std::vector<std::shared_ptr<LogHandler>> LoggerDB::buildCategoryHandlerList(
const NewHandlerMap& handlerMap,
StringPiece categoryName,
const std::vector<std::string>& categoryHandlerNames) { … }
void LoggerDB::updateConfig(const LogConfig& config) { … }
void LoggerDB::resetConfig(const LogConfig& config) { … }
LogCategory* LoggerDB::getOrCreateCategoryLocked(
LoggerNameMap& loggersByName, StringPiece name) { … }
LogCategory* LoggerDB::createCategoryLocked(
LoggerNameMap& loggersByName, StringPiece name, LogCategory* parent) { … }
void LoggerDB::cleanupHandlers() { … }
size_t LoggerDB::flushAllHandlers() { … }
void LoggerDB::registerHandlerFactory(
std::unique_ptr<LogHandlerFactory> factory, bool replaceExisting) { … }
void LoggerDB::unregisterHandlerFactory(StringPiece type) { … }
LogLevel LoggerDB::xlogInit(
StringPiece categoryName,
std::atomic<LogLevel>* xlogCategoryLevel,
LogCategory** xlogCategory) { … }
LogCategory* LoggerDB::xlogInitCategory(
StringPiece categoryName,
LogCategory** xlogCategory,
std::atomic<bool>* isInitialized) { … }
class LoggerDB::ContextCallbackList::CallbacksObj { … };
LoggerDB::ContextCallbackList::~ContextCallbackList() { … }
void LoggerDB::ContextCallbackList::addCallback(ContextCallback callback) { … }
std::string LoggerDB::ContextCallbackList::getContextString() const { … }
void LoggerDB::addContextCallback(ContextCallback callback) { … }
std::string LoggerDB::getContextString() const { … }
std::atomic<LoggerDB::InternalWarningHandler> LoggerDB::warningHandler_;
void LoggerDB::internalWarningImpl(
folly::StringPiece filename, int lineNumber, std::string&& msg) noexcept { … }
void LoggerDB::setInternalWarningHandler(InternalWarningHandler handler) { … }
void LoggerDB::defaultInternalWarningImpl(
folly::StringPiece filename, int lineNumber, std::string&& msg) noexcept { … }
}