Lines Matching refs:Log
26 Log::LogLevel Log::level_;
27 Logger* Log::logger_;
28 std::chrono::time_point<std::chrono::steady_clock> Log::init_time_;
30 void Log::Initialize(Logger *logger, LogLevel level) { in Initialize()
31 if (Log::logger_) { in Initialize()
32 Log::Warn("Re-initializing logger"); in Initialize()
34 Log::init_time_ = std::chrono::steady_clock::now(); in Initialize()
35 Log::logger_ = logger; in Initialize()
36 Log::SetLevel(level); in Initialize()
39 void Log::SetLevel(LogLevel level) { in SetLevel()
40 Log::level_ = level; in SetLevel()
47 Log::LogEx(level, format, arg_list); \
51 void Log::Error(const char *format, ...) { in Error()
55 void Log::Warn(const char *format, ...) { in Warn()
59 void Log::Info(const char *format, ...) { in Info()
63 void Log::Debug(const char *format, ...) { in Debug()
67 void Log::DebugBuf(std::vector<uint8_t> vec) { in DebugBuf()
68 Log::DebugBuf(vec.data(), vec.size()); in DebugBuf()
71 void Log::DebugBuf(const uint8_t *buffer, size_t size) { in DebugBuf()
72 if (Log::level_ < LogLevel::Debug) { in DebugBuf()
81 Log::Debug("Dumping buffer of size %zu bytes", size); in DebugBuf()
89 Log::Debug(" %s\t%s", line, line_chars); in DebugBuf()
103 Log::Debug(" %s%s%s", line, tabs.c_str(), line_chars); in DebugBuf()
107 char Log::LevelAbbrev(LogLevel level) { in LevelAbbrev()
122 void Log::LogEx(LogLevel level, const char *format, va_list arg_list) { in LogEx()
123 if (Log::level_ < level) { in LogEx()
128 (std::chrono::steady_clock::now() - Log::init_time_); in LogEx()
132 snprintf(prefix, sizeof(prefix), "%c %6.03f: ", Log::LevelAbbrev(level), in LogEx()
135 Log::logger_->Output(prefix); in LogEx()
136 Log::logger_->Output(format, arg_list); in LogEx()
137 Log::logger_->Output("\n"); in LogEx()