Skip to content

Commit ac87476

Browse files
committed
add command line arg to ignore specific log names
1 parent 768b847 commit ac87476

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addons/mod_loader/mod_loader_utils.gd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ static func log_debug_json_print(message: String, json_printable, mod_name: Stri
5555
_loader_log(message, mod_name, "debug")
5656

5757

58-
static func _loader_log(message: String, mod_name: String, log_type: String = "info")->void:
58+
static func _loader_log(message: String, mod_name: String, log_type: String = "info") -> void:
59+
var ignored_arg := get_cmd_line_arg_value("--log-ignore")
60+
var ignored_names: Array = str2var(ignored_arg)
61+
if ignored_names and mod_name in ignored_names:
62+
return
63+
5964
var date := "%s " % get_date_time_string()
6065
var prefix := "%s %s: " % [log_type.to_upper(), mod_name]
6166
var log_message := date + prefix + message

0 commit comments

Comments
 (0)