41Result<LogSeverity>
ToSeverity(std::string_view value);
56 const std::string& path,
66void SetLoggers(std::vector<SeverityTarget> destinations,
67 const std::string& log_prefix =
"");
72 std::optional<LogSeverity> severity = std::nullopt);
76void LogToFiles(
const std::vector<std::string>& files,
77 const std::string& log_prefix =
"");
83 const std::vector<std::string>& files,
const std::string& log_prefix =
"",
85 std::optional<LogSeverity> stderr_severity = std::nullopt);
Definition: tee_logging.cpp:211
Definition: tee_logging.h:90
~ScopedLogger()
Definition: tee_logging.cpp:377
ScopedLogger(SeverityTarget target, const std::string &prefix)
Definition: tee_logging.cpp:372
std::unique_ptr< LogSink > log_sink_
Definition: tee_logging.h:96
Definition: shared_fd.h:124
std::string_view prefix
Definition: kernel_log_server.cc:44
Definition: alloc_driver.h:20
MetadataLevel
Definition: tee_logging.h:48
constexpr const char * kFileSeverityEnvVar
Definition: tee_logging.h:29
std::string StripColorCodes(const std::string &str)
Definition: tee_logging.cpp:176
LogSeverity
Definition: tee_logging.h:31
std::string FromSeverity(LogSeverity severity)
Definition: tee_logging.cpp:265
void LogToStderrAndFiles(const std::vector< std::string > &files, const std::string &log_prefix, MetadataLevel stderr_level, std::optional< LogSeverity > stderr_severity)
Definition: tee_logging.cpp:361
void LogToStderr(const std::string &log_prefix, MetadataLevel metadata_level, std::optional< LogSeverity > severity)
Definition: tee_logging.cpp:351
void SetLoggers(std::vector< SeverityTarget > destinations, const std::string &log_prefix)
Definition: tee_logging.cpp:325
void LogToFiles(const std::vector< std::string > &files, const std::string &log_prefix)
Definition: tee_logging.cpp:356
LogSeverity ConsoleSeverity()
Definition: tee_logging.cpp:312
constexpr const char * kConsoleSeverityEnvVar
Definition: tee_logging.h:28
Result< LogSeverity > ToSeverity(std::string_view value)
Definition: tee_logging.cpp:283
LogSeverity LogFileSeverity()
Definition: tee_logging.cpp:316
constexpr const char * str
Definition: utils.h:180
Definition: tee_logging.h:50
LogSeverity severity
Definition: tee_logging.h:51
static SeverityTarget FromFd(SharedFD fd, MetadataLevel metadata_level=MetadataLevel::FULL, LogSeverity severity=LogSeverity::Verbose)
Definition: tee_logging.cpp:206
MetadataLevel metadata_level
Definition: tee_logging.h:53
static SeverityTarget FromFile(const std::string &path, MetadataLevel metadata_level=MetadataLevel::FULL, LogSeverity severity=LogSeverity::Verbose)
Definition: tee_logging.cpp:193
SharedFD target
Definition: tee_logging.h:52