Skip to content

Commit 16e3603

Browse files
committed
Merge branch 'split_off_logging_and_utils' into move_other_utils
2 parents 2a5ef3f + 7afc371 commit 16e3603

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

addons/mod_loader/mod_loader_utils.gd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,29 @@ static func _loader_log(message: String, mod_name: String, log_type: String = "i
6262

6363
match log_type.to_lower():
6464
"fatal-error":
65-
write_to_log_file(log_message)
66-
write_to_log_file(JSON.print(get_stack(), " "))
65+
_write_to_log_file(log_message)
66+
_write_to_log_file(JSON.print(get_stack(), " "))
6767
assert(false, message)
6868
"error":
6969
printerr(message)
7070
push_error(message)
71-
write_to_log_file(log_message)
71+
_write_to_log_file(log_message)
7272
"warning":
73-
if get_verbosity() >= verbosity_level.WARNING:
73+
if _get_verbosity() >= verbosity_level.WARNING:
7474
print(prefix + message)
7575
push_warning(message)
76-
write_to_log_file(log_message)
76+
_write_to_log_file(log_message)
7777
"info", "success":
78-
if get_verbosity() >= verbosity_level.INFO:
78+
if _get_verbosity() >= verbosity_level.INFO:
7979
print(prefix + message)
80-
write_to_log_file(log_message)
80+
_write_to_log_file(log_message)
8181
"debug":
82-
if get_verbosity() >= verbosity_level.DEBUG:
82+
if _get_verbosity() >= verbosity_level.DEBUG:
8383
print(prefix + message)
84-
write_to_log_file(log_message)
84+
_write_to_log_file(log_message)
8585

8686

87-
static func write_to_log_file(log_entry: String) -> void:
87+
static func _write_to_log_file(log_entry: String) -> void:
8888
var log_file = File.new()
8989

9090
if not log_file.file_exists(MOD_LOG_PATH):
@@ -102,7 +102,7 @@ static func write_to_log_file(log_entry: String) -> void:
102102
log_file.close()
103103

104104

105-
static func get_verbosity() -> int:
105+
static func _get_verbosity() -> int:
106106
if is_running_with_command_line_arg("-vvv") or is_running_with_command_line_arg("--log-debug"):
107107
return verbosity_level.DEBUG
108108
if is_running_with_command_line_arg("-vv") or is_running_with_command_line_arg("--log-info"):

0 commit comments

Comments
 (0)