taco-db
0.1.0
|
Logging component for TDB. More...
#include "utils/misc.h"
#include <iostream>
#include <absl/base/log_severity.h>
#include <absl/strings/str_format.h>
Go to the source code of this file.
Classes | |
class | taco::TDBError |
Namespaces | |
taco | |
Macros | |
#define | LOG(level, ...) |
LOG(LogSeverity level, const char *fmt, ...) More... | |
Functions | |
void | taco::LogError (LogSeverity severity, std::string &&msg) |
Logs a message (which may not be an error despite what the name suggests). More... | |
void | taco::SetLogOutput (std::ostream *log_out) |
Sets the output stream where the log messages should be printed to. More... | |
void | taco::RestoreLogOutput () |
Restores the log output stream to std::cerr. More... | |
void | taco::SetLogPrintMinSeverity (LogSeverity min_severity) |
Sets the minimum severity level of a log message to be printed. More... | |
void | taco::DisableLogPrint () |
Disable all log message printing. More... | |
void | taco::SetSecondaryLogOutput (std::ostream *log_out, LogSeverity min_severity) |
Sets the secondary output stream where logs messages additionally prints with at least the specified severity. More... | |
void | taco::ClearSecondaryLogOutput () |
Clears the secondary output stream where logs messages additionally prints. More... | |
Variables | |
constexpr LogSeverity | taco::kInfo = LogSeverity::kInfo |
constexpr LogSeverity | taco::kWarning = LogSeverity::kWarning |
constexpr LogSeverity | taco::kError = LogSeverity::kError |
constexpr LogSeverity | taco::kFatal = LogSeverity::kFatal |
constexpr const size_t | taco::log_msg_buf_size = 8192 |
constexpr const size_t | taco::log_msg_max_len = log_msg_buf_size - 12 |
Logging component for TDB.
This file does not include tdb.h at the beginning as it is always included into the project indirectly from base/tdb_base.h.
This file does not have a header guard intentionally. This must be included indirectly from base/tdb_base.h. Any definition in this file will be put in namespace taco.
#define LOG | ( | level, | |
... | |||
) |
LOG(LogSeverity level, const char *fmt, ...)
Note: fmt must be a string literal or an absl::string_view. The level variable is double evaluated.