folly/folly/logging/LogConfigParser.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/LogConfigParser.h>

#include <folly/Conv.h>
#include <folly/String.h>
#include <folly/json/dynamic.h>
#include <folly/json/json.h>
#include <folly/lang/SafeAssert.h>
#include <folly/logging/LogName.h>

string;

namespace folly {

namespace {

/**
 * Get the type of a folly::dynamic object as a string, for inclusion in
 * exception messages.
 */
std::string dynamicTypename(const dynamic& value) {}

/**
 * Parse a LogLevel from a JSON value.
 *
 * This accepts the log level either as an integer value or a string that can
 * be parsed with stringToLogLevel()
 *
 * On success updates the result parameter and returns true.
 * Returns false if the input is not a string or integer.
 * Throws a LogConfigParseError on other errors.
 */
bool parseJsonLevel(
    const dynamic& value, StringPiece categoryName, LogLevel& result) {}

LogCategoryConfig parseJsonCategoryConfig(
    const dynamic& value, StringPiece categoryName) {}

LogHandlerConfig parseJsonHandlerConfig(
    const dynamic& value, StringPiece handlerName) {}

LogConfig::CategoryConfigMap parseCategoryConfigs(StringPiece value) {}

bool splitNameValue(
    StringPiece input, StringPiece* outName, StringPiece* outValue) {}

std::pair<std::string, LogHandlerConfig> parseHandlerConfig(StringPiece value) {}

} // namespace

LogConfig parseLogConfig(StringPiece value) {}

LogConfig parseLogConfigJson(StringPiece value) {}

LogConfig parseLogConfigDynamic(const dynamic& value) {}

dynamic logConfigToDynamic(const LogConfig& config) {}

dynamic logConfigToDynamic(const LogHandlerConfig& config) {}

dynamic logConfigToDynamic(const LogCategoryConfig& config) {}

} // namespace folly