2022-02-10 10:38:37 +01:00
|
|
|
|
2021-10-31 23:34:08 +01:00
|
|
|
#include "logger.h"
|
|
|
|
|
2021-11-19 20:02:16 +01:00
|
|
|
#include "core/string.h"
|
2021-10-31 23:34:08 +01:00
|
|
|
#include <cstdio>
|
|
|
|
|
2022-02-10 00:50:19 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "logger.h"
|
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
void RLogger::log_trace(const String &str) {
|
|
|
|
log_trace(str.data());
|
|
|
|
}
|
|
|
|
void RLogger::log_trace(const char *str) {
|
|
|
|
printf("T %s\n", str);
|
|
|
|
}
|
|
|
|
|
|
|
|
void RLogger::log_message(const String &str) {
|
|
|
|
log_message(str.data());
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|
2022-02-10 00:50:19 +01:00
|
|
|
void RLogger::log_message(const char *str) {
|
|
|
|
printf("M %s\n", str);
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|
|
|
|
|
2022-02-10 00:50:19 +01:00
|
|
|
void RLogger::log_warning(const String &str) {
|
|
|
|
log_warning(str.data());
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|
2022-02-10 00:50:19 +01:00
|
|
|
void RLogger::log_warning(const char *str) {
|
|
|
|
printf("W %s\n", str);
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|
|
|
|
|
2022-02-10 00:50:19 +01:00
|
|
|
void RLogger::log_error(const String &str) {
|
|
|
|
log_error(str.data());
|
|
|
|
}
|
|
|
|
void RLogger::log_error(const char *str) {
|
|
|
|
printf("E %s\n", str);
|
|
|
|
}
|
|
|
|
|
|
|
|
void RLogger::_log_error(const char *p_function, const char *p_file, int p_line, const char *str) {
|
|
|
|
printf("!ERROR: (%s) %s:%d. %s\n", p_file, p_function, p_line, str);
|
|
|
|
}
|
|
|
|
void RLogger::_log_error(const char *p_function, const char *p_file, int p_line, const String &str) {
|
|
|
|
printf("!ERROR: (%s) %s:%d. %s\n", p_file, p_function, p_line, str.c_str());
|
|
|
|
}
|
|
|
|
void RLogger::_log_msg_error(const char *p_function, const char *p_file, int p_line, const char *p_msg, const char *str) {
|
|
|
|
printf("!ERROR: (%s) %s:%d :: %s. %s\n", p_file, p_function, p_line, str, p_msg);
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|
2022-02-10 00:50:19 +01:00
|
|
|
void RLogger::_log_index_error(const char *p_function, const char *p_file, int p_line, const int index, const int size, const char *str) {
|
|
|
|
printf("!INDEX ERROR: (%s) %s:%d :: index: %d/%d. %s\n", p_file, p_function, p_line, index, size, str);
|
2021-10-31 23:34:08 +01:00
|
|
|
}
|