folly/folly/logging/LoggerDB.cpp

/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#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 {

/*
 * The default implementation of initializeLoggerDB().
 *
 * This is defined as a weak symbol to allow programs to provide their own
 * alternative definition if desired.
 */
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 {}

/**
 * Process handler config information when starting a config update operation.
 */
void LoggerDB::startConfigUpdate(
    const Synchronized<HandlerInfo>::LockedPtr& handlerInfo,
    const LogConfig& config,
    NewHandlerMap* handlers,
    OldToNewHandlerMap* oldToNewHandlerMap) {}

/**
 * Update handlerInfo_ at the end of a config update operation.
 */
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 {}
} // namespace folly