summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd/gd_mono_log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_log.cpp')
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index b56350ae1b..04728be725 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -51,7 +51,6 @@ GDMonoLog *GDMonoLog::singleton = nullptr;
#ifdef GD_MONO_LOG_ENABLED
static int get_log_level_id(const char *p_log_level) {
-
const char *valid_log_levels[] = { "error", "critical", "warning", "message", "info", "debug", nullptr };
int i = 0;
@@ -65,7 +64,6 @@ static int get_log_level_id(const char *p_log_level) {
}
void GDMonoLog::mono_log_callback(const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *) {
-
FileAccess *f = GDMonoLog::get_singleton()->log_file;
if (GDMonoLog::get_singleton()->log_level_id >= get_log_level_id(log_level)) {
@@ -94,7 +92,6 @@ void GDMonoLog::mono_log_callback(const char *log_domain, const char *log_level,
}
bool GDMonoLog::_try_create_logs_dir(const String &p_logs_dir) {
-
if (!DirAccess::exists(p_logs_dir)) {
DirAccessRef diraccess = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
ERR_FAIL_COND_V(!diraccess, false);
@@ -106,7 +103,6 @@ bool GDMonoLog::_try_create_logs_dir(const String &p_logs_dir) {
}
void GDMonoLog::_delete_old_log_files(const String &p_logs_dir) {
-
static const uint64_t MAX_SECS = 5 * 86400; // 5 days
DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
@@ -135,7 +131,6 @@ void GDMonoLog::_delete_old_log_files(const String &p_logs_dir) {
}
void GDMonoLog::initialize() {
-
CharString log_level = OS::get_singleton()->get_environment("GODOT_MONO_LOG_LEVEL").utf8();
if (log_level.length() != 0 && get_log_level_id(log_level.get_data()) == -1) {
@@ -183,14 +178,12 @@ void GDMonoLog::initialize() {
}
GDMonoLog::GDMonoLog() {
-
singleton = this;
log_level_id = -1;
}
GDMonoLog::~GDMonoLog() {
-
singleton = nullptr;
if (log_file) {
@@ -207,12 +200,10 @@ void GDMonoLog::initialize() {
}
GDMonoLog::GDMonoLog() {
-
singleton = this;
}
GDMonoLog::~GDMonoLog() {
-
singleton = nullptr;
}