#include "absl/log/internal/log_message.h"
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <algorithm>
#include <array>
#include <atomic>
#include <ios>
#include <memory>
#include <ostream>
#include <string>
#include <tuple>
#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/strerror.h"
#include "absl/base/internal/sysinfo.h"
#include "absl/base/log_severity.h"
#include "absl/container/inlined_vector.h"
#include "absl/debugging/internal/examine_stack.h"
#include "absl/log/globals.h"
#include "absl/log/internal/append_truncated.h"
#include "absl/log/internal/globals.h"
#include "absl/log/internal/log_format.h"
#include "absl/log/internal/log_sink_set.h"
#include "absl/log/internal/proto.h"
#include "absl/log/log_entry.h"
#include "absl/log/log_sink.h"
#include "absl/log/log_sink_registry.h"
#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
extern "C" ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(
AbslInternalOnFatalLogMessage)(const absl::LogEntry&) { … }
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace log_internal {
namespace {
enum EventTag : uint8_t { … };
enum ValueTag : uint8_t { … };
bool PrintValue(absl::Span<char>& dst, absl::Span<const char> buf) { … }
int32_t ProtoSeverity(absl::LogSeverity severity, int verbose_level) { … }
absl::string_view Basename(absl::string_view filepath) { … }
void WriteToString(const char* data, void* str) { … }
void WriteToStream(const char* data, void* os) { … }
}
struct LogMessage::LogMessageData final { … };
LogMessage::LogMessageData::LogMessageData(const char* file, int line,
absl::LogSeverity severity,
absl::Time timestamp)
: … { … }
void LogMessage::LogMessageData::InitializeEncodingAndFormat() { … }
void LogMessage::LogMessageData::FinalizeEncodingAndFormat() { … }
LogMessage::LogMessage(const char* file, int line, absl::LogSeverity severity)
: … { … }
LogMessage::LogMessage(const char* file, int line, InfoTag)
: … { … }
LogMessage::LogMessage(const char* file, int line, WarningTag)
: … { … }
LogMessage::LogMessage(const char* file, int line, ErrorTag)
: … { … }
LogMessage::~LogMessage() { … }
LogMessage& LogMessage::AtLocation(absl::string_view file, int line) { … }
LogMessage& LogMessage::NoPrefix() { … }
LogMessage& LogMessage::WithVerbosity(int verbose_level) { … }
LogMessage& LogMessage::WithTimestamp(absl::Time timestamp) { … }
LogMessage& LogMessage::WithThreadID(absl::LogEntry::tid_t tid) { … }
LogMessage& LogMessage::WithMetadataFrom(const absl::LogEntry& entry) { … }
LogMessage& LogMessage::WithPerror() { … }
LogMessage& LogMessage::ToSinkAlso(absl::LogSink* sink) { … }
LogMessage& LogMessage::ToSinkOnly(absl::LogSink* sink) { … }
#ifdef __ELF__
extern "C" void __gcov_dump() ABSL_ATTRIBUTE_WEAK;
extern "C" void __gcov_flush() ABSL_ATTRIBUTE_WEAK;
#endif
void LogMessage::FailWithoutStackTrace() { … }
void LogMessage::FailQuietly() { … }
LogMessage& LogMessage::operator<<(const std::string& v) { … }
LogMessage& LogMessage::operator<<(absl::string_view v) { … }
LogMessage& LogMessage::operator<<(std::ostream& (*m)(std::ostream& os)) { … }
LogMessage& LogMessage::operator<<(std::ios_base& (*m)(std::ios_base& os)) { … }
template LogMessage& LogMessage::operator<<(const char& v);
template LogMessage& LogMessage::operator<<(const signed char& v);
template LogMessage& LogMessage::operator<<(const unsigned char& v);
template LogMessage& LogMessage::operator<<(const short& v);
template LogMessage& LogMessage::operator<<(const unsigned short& v);
template LogMessage& LogMessage::operator<<(const int& v);
template LogMessage& LogMessage::operator<<(const unsigned int& v);
template LogMessage& LogMessage::operator<<(const long& v);
template LogMessage& LogMessage::operator<<(const unsigned long& v);
template LogMessage& LogMessage::operator<<(const long long& v);
template LogMessage& LogMessage::operator<<(
const unsigned long long& v);
template LogMessage& LogMessage::operator<<(void* const& v);
template LogMessage& LogMessage::operator<<(const void* const& v);
template LogMessage& LogMessage::operator<<(const float& v);
template LogMessage& LogMessage::operator<<(const double& v);
template LogMessage& LogMessage::operator<<(const bool& v);
void LogMessage::Flush() { … }
void LogMessage::SetFailQuietly() { … }
LogMessage::OstreamView::OstreamView(LogMessageData& message_data)
: … { … }
LogMessage::OstreamView::~OstreamView() { … }
std::ostream& LogMessage::OstreamView::stream() { … }
bool LogMessage::IsFatal() const { … }
void LogMessage::PrepareToDie() { … }
void LogMessage::Die() { … }
void LogMessage::SendToLog() { … }
void LogMessage::LogBacktraceIfNeeded() { … }
template <LogMessage::StringType str_type>
void LogMessage::CopyToEncodedBuffer(absl::string_view str) { … }
template void LogMessage::CopyToEncodedBuffer<LogMessage::StringType::kLiteral>(
absl::string_view str);
template void LogMessage::CopyToEncodedBuffer<
LogMessage::StringType::kNotLiteral>(absl::string_view str);
template <LogMessage::StringType str_type>
void LogMessage::CopyToEncodedBuffer(char ch, size_t num) { … }
template void LogMessage::CopyToEncodedBuffer<LogMessage::StringType::kLiteral>(
char ch, size_t num);
template void LogMessage::CopyToEncodedBuffer<
LogMessage::StringType::kNotLiteral>(char ch, size_t num);
#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 4722)
#endif
LogMessageFatal::LogMessageFatal(const char* file, int line)
: … { … }
LogMessageFatal::LogMessageFatal(const char* file, int line,
absl::string_view failure_msg)
: … { … }
LogMessageFatal::~LogMessageFatal() { … }
LogMessageDebugFatal::LogMessageDebugFatal(const char* file, int line)
: … { … }
LogMessageDebugFatal::~LogMessageDebugFatal() { … }
LogMessageQuietlyDebugFatal::LogMessageQuietlyDebugFatal(const char* file,
int line)
: … { … }
LogMessageQuietlyDebugFatal::~LogMessageQuietlyDebugFatal() { … }
LogMessageQuietlyFatal::LogMessageQuietlyFatal(const char* file, int line)
: … { … }
LogMessageQuietlyFatal::LogMessageQuietlyFatal(const char* file, int line,
absl::string_view failure_msg)
: … { … }
LogMessageQuietlyFatal::~LogMessageQuietlyFatal() { … }
#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(pop)
#endif
}
ABSL_NAMESPACE_END
}