4 #include <Utils/LogEntry.h> 5 #include <Utils/StrongType.h> 6 #include <Utils/AtomicQueue.h> 12 static const Category DEFAULT_CATEGORY{
"Default" };
19 Entry(Type type, Category categ,
const std::string &msg,
const std::string &caller);
20 [[nodiscard]] Category GetCategory()
const;
21 [[nodiscard]] std::string
ToString(
const std::string &time_format =
"%Y-%m-%d %H:%M:%S")
const override;
43 void ProcessEntries(std::function<
void(
const ulog::Entry &)>
func);
45 size_t GetEntryCount()
const;
58 void AddMessage(ulog::Entry::Type,
ulog::Category,
const std::string &,
const std::string &)
override;
60 ulog::Entry::Type maximal_ignored_type_ = ulog::Entry::Type::info;
64 UTILS_API
void InstallHandler(
const std::shared_ptr<LogHandler> &sink_to_use);
67 UTILS_API
void ResetHandler();
70 UTILS_API
void Debug(
const std::string &msg,
const std::string &caller =
"");
73 UTILS_API
void Info(
const std::string &msg,
const std::string &caller =
"");
76 UTILS_API
void Warn(
const std::string &msg,
const std::string &caller =
"");
79 UTILS_API
void Fail(
const std::string &msg,
const std::string &caller =
"");
82 UTILS_API
void Crash(
const std::string &msg,
const std::string &caller =
"");
87 UTILS_API
void DebugC(
Category msg_category,
const std::string &msg,
const std::string &caller =
"");
90 UTILS_API
void InfoC(
Category msg_category,
const std::string &msg,
const std::string &caller =
"");
93 UTILS_API
void WarnC(
Category msg_category,
const std::string &msg,
const std::string &caller =
"");
96 UTILS_API
void FailC(
Category msg_category,
const std::string &msg,
const std::string &caller =
"");
99 UTILS_API
void CrashC(
Category msg_category,
const std::string &msg,
const std::string &caller =
"");
Stores log messages in a pool to be processed later.
Definition: Ulog.h:37
Abstract class that can be inherited to create custom log message behavior.
Definition: Ulog.h:29
A single entry for the logging system.
Definition: LogEntry.h:18
std::string ToString(const std::vector< T > &container, const std::string &separator=", ")
Converts all values in the vector to a string and joins them using specified separator.
Definition: ExtSTD.h:233
Contains common lambda functions.
Definition: Functional.h:12
Type
Defines the character of a LogEntry.
Definition: LogEntry.h:22
Log handler that ignores and discards all log messages.
Definition: Ulog.h:51