chromium/v8/src/logging/log-file.h

// Copyright 2006-2009 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_LOGGING_LOG_FILE_H_
#define V8_LOGGING_LOG_FILE_H_

#include <stdio.h>

#include <atomic>
#include <cstdarg>
#include <memory>
#include <optional>

#include "src/base/compiler-specific.h"
#include "src/base/platform/mutex.h"
#include "src/common/assert-scope.h"
#include "src/flags/flags.h"
#include "src/utils/allocation.h"
#include "src/utils/ostreams.h"

namespace v8 {

namespace base {
template <typename T>
class Vector;
}  // namespace base

namespace internal {

class V8FileLogger;

enum class LogSeparator {};

// Functions and data for performing output of log messages.
class LogFile {};

template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<<<LogSeparator>(
    LogSeparator separator);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<<<void*>(
    void* pointer);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<<<const char*>(
    const char* string);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<<<char>(char c);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<< <Tagged<String>>(
    Tagged<String> string);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<< <Tagged<Symbol>>(
    Tagged<Symbol> symbol);
template <>
LogFile::MessageBuilder& LogFile::MessageBuilder::operator<< <Tagged<Name>>(
    Tagged<Name> name);

}  // namespace internal
}  // namespace v8

#endif  // V8_LOGGING_LOG_FILE_H_