mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 09:29:38 +01:00
Removed unnecessary methods from PLogger's bind class, and added properties.
This commit is contained in:
parent
b0ebe103f7
commit
f3373e0fa4
@ -13,54 +13,18 @@ void _PLogger::set_backend(const Ref<LoggerBackend> &backend) {
|
||||
void _PLogger::log_trace(const String &str) {
|
||||
PLogger::log_trace(str);
|
||||
}
|
||||
void _PLogger::log_trace(const char *str) {
|
||||
PLogger::log_trace(str);
|
||||
}
|
||||
void _PLogger::log_trace(const char *p_function, const char *p_file, int p_line, const char *str) {
|
||||
PLogger::log_trace(p_function, p_file, p_line, str);
|
||||
}
|
||||
void _PLogger::log_trace(const char *p_function, const char *p_file, int p_line, const String &str) {
|
||||
PLogger::log_trace(p_function, p_file, p_line, str);
|
||||
}
|
||||
|
||||
void _PLogger::log_message(const String &str) {
|
||||
PLogger::log_message(str);
|
||||
}
|
||||
void _PLogger::log_message(const char *str) {
|
||||
PLogger::log_message(str);
|
||||
}
|
||||
void _PLogger::log_message(const char *p_function, const char *p_file, int p_line, const char *str) {
|
||||
PLogger::log_message(p_function, p_file, p_line, str);
|
||||
}
|
||||
void _PLogger::log_message(const char *p_function, const char *p_file, int p_line, const String &str) {
|
||||
PLogger::log_message(p_function, p_file, p_line, str);
|
||||
}
|
||||
|
||||
void _PLogger::log_warning(const String &str) {
|
||||
PLogger::log_warning(str);
|
||||
}
|
||||
void _PLogger::log_warning(const char *str) {
|
||||
PLogger::log_warning(str);
|
||||
}
|
||||
void _PLogger::log_warning(const char *p_function, const char *p_file, int p_line, const char *str) {
|
||||
PLogger::log_warning(p_function, p_file, p_line, str);
|
||||
}
|
||||
void _PLogger::log_warning(const char *p_function, const char *p_file, int p_line, const String &str) {
|
||||
PLogger::log_warning(p_function, p_file, p_line, str);
|
||||
}
|
||||
|
||||
void _PLogger::log_error(const String &str) {
|
||||
PLogger::log_error(str);
|
||||
}
|
||||
void _PLogger::log_error(const char *str) {
|
||||
PLogger::log_error(str);
|
||||
}
|
||||
void _PLogger::log_error(const char *p_function, const char *p_file, int p_line, const char *str) {
|
||||
PLogger::log_error(p_function, p_file, p_line, str);
|
||||
}
|
||||
void _PLogger::log_error(const char *p_function, const char *p_file, int p_line, const String &str) {
|
||||
PLogger::log_error(p_function, p_file, p_line, str);
|
||||
}
|
||||
|
||||
_PLogger *_PLogger::get_singleton() {
|
||||
return _self;
|
||||
@ -74,6 +38,14 @@ _PLogger::~_PLogger() {
|
||||
}
|
||||
|
||||
void _PLogger::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_backend"), &_PLogger::get_backend);
|
||||
ClassDB::bind_method(D_METHOD("set_backend", "backend"), &_PLogger::set_backend);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "backend", PROPERTY_HINT_RESOURCE_TYPE, "LoggerBackend"), "set_backend", "get_backend");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("log_trace", "str"), &_PLogger::log_trace);
|
||||
ClassDB::bind_method(D_METHOD("log_message", "str"), &_PLogger::log_message);
|
||||
ClassDB::bind_method(D_METHOD("log_warning", "str"), &_PLogger::log_warning);
|
||||
ClassDB::bind_method(D_METHOD("log_error", "str"), &_PLogger::log_error);
|
||||
}
|
||||
|
||||
_PLogger *_PLogger::_self = nullptr;
|
||||
|
@ -17,24 +17,9 @@ public:
|
||||
void set_backend(const Ref<LoggerBackend> &backend);
|
||||
|
||||
void log_trace(const String &str);
|
||||
void log_trace(const char *str);
|
||||
void log_trace(const char *p_function, const char *p_file, int p_line, const String &str);
|
||||
void log_trace(const char *p_function, const char *p_file, int p_line, const char *str);
|
||||
|
||||
void log_message(const String &str);
|
||||
void log_message(const char *str);
|
||||
void log_message(const char *p_function, const char *p_file, int p_line, const String &str);
|
||||
void log_message(const char *p_function, const char *p_file, int p_line, const char *str);
|
||||
|
||||
void log_warning(const String &str);
|
||||
void log_warning(const char *str);
|
||||
void log_warning(const char *p_function, const char *p_file, int p_line, const String &str);
|
||||
void log_warning(const char *p_function, const char *p_file, int p_line, const char *str);
|
||||
|
||||
void log_error(const String &str);
|
||||
void log_error(const char *str);
|
||||
void log_error(const char *p_function, const char *p_file, int p_line, const char *str);
|
||||
void log_error(const char *p_function, const char *p_file, int p_line, const String &str);
|
||||
|
||||
static _PLogger *get_singleton();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user