30Result<android::base::LogSeverity>
ToSeverity(
const std::string& value);
34 const char* tag,
const char* file,
35 unsigned int line,
const char* message);
53 TeeLogger(
const std::vector<SeverityTarget>& destinations,
54 const std::string& log_prefix =
"");
59 const char* file,
unsigned int line,
const char* message);
76 const std::string& log_prefix =
"",
78 std::optional<android::base::LogSeverity> stderr_severity = std::nullopt);
80 const std::string& log_prefix =
"");
82 const std::vector<std::string>& files,
const std::string& log_prefix =
"",
84 std::optional<android::base::LogSeverity> stderr_severity = std::nullopt);
Definition: logging.h:452
Definition: tee_logging.h:65
~ScopedTeeLogger()
Definition: tee_logging.cpp:143
ScopedTeeLogger(TeeLogger tee_logger)
Definition: tee_logging.cpp:136
android::base::LogFunction old_logger_
Definition: tee_logging.h:71
android::base::ScopedLogSeverity scoped_severity_
Definition: tee_logging.h:72
Definition: shared_fd.h:129
Definition: tee_logging.h:48
std::vector< SeverityTarget > destinations_
Definition: tee_logging.h:50
std::string prefix_
Definition: tee_logging.h:62
TeeLogger(const std::vector< SeverityTarget > &destinations, const std::string &log_prefix="")
Definition: tee_logging.cpp:132
void operator()(android::base::LogId log_id, android::base::LogSeverity severity, const char *tag, const char *file, unsigned int line, const char *message)
Definition: tee_logging.cpp:239
log_id
Definition: log.h:138
std::function< void(LogId, LogSeverity, const char *, const char *, unsigned int, const char *)> LogFunction
Definition: logging.h:110
LogId
Definition: logging.h:97
LogSeverity
Definition: logging.h:87
Definition: alloc_utils.cpp:23
TeeLogger LogToFiles(const std::vector< std::string > &files, const std::string &log_prefix)
Definition: tee_logging.cpp:297
MetadataLevel
Definition: tee_logging.h:40
std::string StripColorCodes(const std::string &str)
Definition: tee_logging.cpp:222
std::string StderrOutputGenerator(const struct tm &now, int pid, uint64_t tid, LogSeverity severity, const char *tag, const char *file, unsigned int line, const char *message)
Definition: tee_logging.cpp:182
TeeLogger LogToStderr(const std::string &log_prefix, MetadataLevel stderr_level, std::optional< android::base::LogSeverity > stderr_severity)
Definition: tee_logging.cpp:288
Result< LogSeverity > ToSeverity(const std::string &value)
Definition: tee_logging.cpp:83
TeeLogger LogToStderrAndFiles(const std::vector< std::string > &files, const std::string &log_prefix, MetadataLevel stderr_level, std::optional< android::base::LogSeverity > stderr_severity)
Definition: tee_logging.cpp:302
LogSeverity LogFileSeverity()
Definition: tee_logging.cpp:128
LogSeverity ConsoleSeverity()
Definition: tee_logging.cpp:124
std::string FromSeverity(const android::base::LogSeverity severity)
Definition: tee_logging.cpp:63
constexpr const char * str
Definition: utils.h:180
Definition: tee_logging.h:42
android::base::LogSeverity severity
Definition: tee_logging.h:43
MetadataLevel metadata_level
Definition: tee_logging.h:45
SharedFD target
Definition: tee_logging.h:44
double now()
Definition: util.cpp:45