Android-cuttlefish cvd tool
Classes | Namespaces | Enumerations | Functions | Variables
tee_logging.h File Reference
#include <memory>
#include <optional>
#include <string_view>
#include <vector>
#include "cuttlefish/common/libs/fs/shared_fd.h"
#include "cuttlefish/result/result.h"
Include dependency graph for tee_logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cuttlefish::SeverityTarget
 
class  cuttlefish::ScopedLogger
 

Namespaces

namespace  cuttlefish
 

Enumerations

enum class  cuttlefish::LogSeverity : int {
  cuttlefish::Verbose = 0 , cuttlefish::Debug , cuttlefish::Info , cuttlefish::Warning ,
  cuttlefish::Error , cuttlefish::Fatal
}
 
enum class  cuttlefish::MetadataLevel { cuttlefish::FULL , cuttlefish::ONLY_MESSAGE , cuttlefish::TAG_AND_MESSAGE }
 

Functions

std::string cuttlefish::FromSeverity (LogSeverity severity)
 
Result< LogSeverity > cuttlefish::ToSeverity (std::string_view value)
 
std::string cuttlefish::StripColorCodes (const std::string &str)
 
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)
 

Variables

constexpr const char * cuttlefish::kConsoleSeverityEnvVar = "CF_CONSOLE_SEVERITY"
 
constexpr const char * cuttlefish::kFileSeverityEnvVar = "CF_FILE_SEVERITY"