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

#include <folly/logging/LogStream.h>
#include <folly/logging/xlog.h>

namespace folly {

LogStreamProcessor::LogStreamProcessor(
    const LogCategory* category,
    LogLevel level,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    AppendType) noexcept
    :{}

LogStreamProcessor::LogStreamProcessor(
    XlogCategoryInfo<true>* categoryInfo,
    LogLevel level,
    folly::StringPiece categoryName,
    bool isCategoryNameOverridden,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    AppendType) noexcept
    :{}

LogStreamProcessor::LogStreamProcessor(
    const LogCategory* category,
    LogLevel level,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    InternalType,
    std::string&& msg) noexcept
    :{}

namespace {
LogCategory* getXlogCategory(
    XlogCategoryInfo<true>* categoryInfo,
    folly::StringPiece categoryName,
    bool isCategoryNameOverridden) {}
} // namespace

/**
 * Construct a LogStreamProcessor from an XlogCategoryInfo.
 *
 * We intentionally define this in LogStreamProcessor.cpp instead of
 * LogStreamProcessor.h to avoid having it inlined at every XLOG() call site,
 * to reduce the emitted code size.
 */
LogStreamProcessor::LogStreamProcessor(
    XlogCategoryInfo<true>* categoryInfo,
    LogLevel level,
    folly::StringPiece categoryName,
    bool isCategoryNameOverridden,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    InternalType,
    std::string&& msg) noexcept
    :{}

namespace {
LogCategory* getXlogCategory(XlogFileScopeInfo* fileScopeInfo) {}
} // namespace

/**
 * Construct a LogStreamProcessor from an XlogFileScopeInfo.
 *
 * We intentionally define this in LogStreamProcessor.cpp instead of
 * LogStreamProcessor.h to avoid having it inlined at every XLOG() call site,
 * to reduce the emitted code size.
 *
 * This is only defined if __INCLUDE_LEVEL__ is available.  The
 * XlogFileScopeInfo APIs are only invoked if we can use __INCLUDE_LEVEL__ to
 * tell that an XLOG() statement occurs in a non-header file.  For compilers
 * that do not support __INCLUDE_LEVEL__, the category information is always
 * passed in as XlogCategoryInfo<true> rather than as XlogFileScopeInfo.
 */
LogStreamProcessor::LogStreamProcessor(
    XlogFileScopeInfo* fileScopeInfo,
    LogLevel level,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    InternalType,
    std::string&& msg) noexcept
    :{}

LogStreamProcessor::LogStreamProcessor(
    XlogFileScopeInfo* fileScopeInfo,
    LogLevel level,
    folly::StringPiece filename,
    unsigned int lineNumber,
    folly::StringPiece functionName,
    AppendType) noexcept
    :{}

/*
 * We intentionally define the LogStreamProcessor destructor in
 * LogStreamProcessor.cpp instead of LogStreamProcessor.h to avoid having it
 * emitted inline at every log statement site.  This helps reduce the emitted
 * code size for each log statement.
 */
LogStreamProcessor::~LogStreamProcessor() noexcept {}

void LogStreamProcessor::logNow() noexcept {}

std::string LogStreamProcessor::extractMessageString(
    LogStream& stream) noexcept {}

void LogStreamVoidify<true>::operator&(std::ostream& stream) {}

void logDisabledHelper(std::true_type) noexcept {}
} // namespace folly