Android-cuttlefish cvd tool
Classes | Namespaces | Functions
tee_logging.cpp File Reference
#include "cuttlefish/common/libs/utils/tee_logging.h"
#include <fcntl.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <algorithm>
#include <cctype>
#include <cinttypes>
#include <cstring>
#include <ctime>
#include <limits>
#include <optional>
#include <sstream>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
#include "absl/base/log_severity.h"
#include "absl/log/globals.h"
#include "absl/log/initialize.h"
#include "absl/log/log.h"
#include "absl/log/log_entry.h"
#include "absl/log/log_sink.h"
#include "absl/log/log_sink_registry.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_format.h"
#include "android-base/file.h"
#include "android-base/macros.h"
#include "android-base/threads.h"
#include "fmt/format.h"
#include "cuttlefish/common/libs/fs/fd.h"
#include "cuttlefish/common/libs/fs/shared_buf.h"
#include "cuttlefish/common/libs/fs/shared_fd.h"
#include "cuttlefish/common/libs/utils/environment.h"
#include "cuttlefish/process/proc_file_utils.h"
#include "cuttlefish/result/result.h"
Include dependency graph for tee_logging.cpp:

Classes

class  cuttlefish::LogSink
 

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::anonymous_namespace{tee_logging.cpp}
 

Functions

std::string cuttlefish::anonymous_namespace{tee_logging.cpp}::ToUpper (std::string_view input)
 
std::vector< SeverityTarget > cuttlefish::anonymous_namespace{tee_logging.cpp}::SeverityTargetsForFiles (const std::vector< std::string > &files)
 
LogSeverity cuttlefish::anonymous_namespace{tee_logging.cpp}::FromLogEntry (const absl::LogEntry &log_entry)
 
std::pair< int, int > cuttlefish::anonymous_namespace{tee_logging.cpp}::CountSizeAndNewLines (const char *message)
 
template<typename F , typename... Args>
void cuttlefish::anonymous_namespace{tee_logging.cpp}::SplitByLines (const char *msg, const F &log_function, Args &&... args)
 
std::string cuttlefish::anonymous_namespace{tee_logging.cpp}::StderrOutputGenerator (const struct tm &now, int pid, uint64_t tid, LogSeverity severity, const char *tag, const char *file, unsigned int line, const char *message)
 
std::string cuttlefish::StripColorCodes (const std::string &str)
 
std::string cuttlefish::FromSeverity (LogSeverity severity)
 
Result< LogSeverity > cuttlefish::ToSeverity (std::string_view value)
 
static LogSeverity cuttlefish::GuessSeverity (const std::string &env_var, LogSeverity default_value)
 
LogSeverity cuttlefish::ConsoleSeverity ()
 
LogSeverity cuttlefish::LogFileSeverity ()
 
void cuttlefish::SetLoggers (std::vector< SeverityTarget > destinations, const std::string &log_prefix)
 
void cuttlefish::LogToStderr (const std::string &log_prefix, MetadataLevel metadata_level, std::optional< LogSeverity > severity)
 
void cuttlefish::LogToFiles (const std::vector< std::string > &files, const std::string &log_prefix)
 
void cuttlefish::LogToStderrAndFiles (const std::vector< std::string > &files, const std::string &log_prefix, MetadataLevel stderr_level, std::optional< LogSeverity > stderr_severity)