3#ifndef TRAM_SDK_FRAMEWORK_LOGGING_H
4#define TRAM_SDK_FRAMEWORK_LOGGING_H
21namespace implementation {
22 template <
typename T>
void concat(
const T& value) {
23 concat<const char*>(
"LOGGER_UNDEFINED_TYPE");
26 template <>
void concat(
const std::string_view& value);
27 template <>
void concat(
const std::string& value);
28 template <>
void concat(
const char*
const& value);
29 template <>
void concat(
const UID& value);
31 void concat(
const char (&value)[N]) {
32 concat<const char*>(value);
42 template <std::
signed_
integral T>
void concat(
const T& value) {
43 concat_numeric<int64_t>(value);
46 template <std::
unsigned_
integral T>
void concat(
const T& value) {
47 concat_numeric<uint64_t>(value);
50 template <std::
floating_po
int T>
void concat(
const T& value) {
51 concat_numeric<float>(value);
61 flush(severity, system);
64 template <
typename T,
typename... Args>
69 log(flush, severity, system, format, args...);
78template <
typename... Args>
80 std::string_view format_view = format;
84template <
typename... Args>
86 std::string_view format_view = format;
90template <
typename... Args>
91void Log(
const std::string_view& format, Args&&... args) {
92 std::string_view format_view = format;
96template <
typename... Args>
97void DisplayLog(
int time,
const std::string_view& format, Args&&... args) {
98 std::string_view format_view = format;
uint32_t system_t
Definition: system.h:10
void concat_fmt(std::string_view &str)
Definition: logging.cpp:62
void flush_console(Severity severity, System::system_t system)
Definition: logging.cpp:74
void concat(const std::string_view &value)
Definition: logging.cpp:134
void log(void(*flush)(Severity, System::system_t), Severity severity, System::system_t system, std::string_view &format)
Definition: logging.h:59
void concat_numeric(const int64_t &value)
Definition: logging.cpp:161
void flush_display(int time, int system)
Definition: logging.cpp:126
Severity
Definition: logging.h:13
void Log(Severity severity, System::system_t system, const std::string_view &format, Args &&... args)
Definition: logging.h:79
void DisplayLog(int time, const std::string_view &format, Args &&... args)
Definition: logging.h:97
void SetSystemLoggingSeverity(System::system_t system, Severity min_severity)
Sets the logging severity filter.
Definition: logging.cpp:27
void SetConsoleLogCallback(void(*callback)(int, const char *))
Sets the console log callback.
Definition: logging.cpp:48
void SetDisplayLogCallback(void(*callback)(int, const char *))
Sets the display log callback.
Definition: logging.cpp:41
Interned string type.
Definition: uid.h:10