Log through a GameLog autoload instead of print()
GameLog.debug() prints only in debug builds, and GameLog.warning() reports problems such as unexpected server data or failed downloads.
This commit is contained in:
1 parent
5cdec5cc8f
commit
5831e1e73d
20 files changed
+137
-89
No files matched your search
+3
-3
@@ -39,7 +39,7 @@ func close() -> void:
|
||||
super()
|
||||
|
||||
func search() -> void:
|
||||
print(search_bar.text)
|
||||
GameLog.debug(search_bar.text)
|
||||
var search_text: String = search_bar.text
|
||||
|
||||
if search_text == "":
|
||||
@@ -153,7 +153,7 @@ func check_if_soundtrack_exists(soundtrack: String) -> bool:
|
||||
return soundtrack_exists
|
||||
|
||||
func get_list_of_soundtracks() -> void:
|
||||
print("get_list_of_soundtracks")
|
||||
GameLog.debug("get_list_of_soundtracks")
|
||||
var handle_soundtracks: Callable = func handle_soundtracks(array) -> void:
|
||||
if typeof(array) == TYPE_ARRAY:
|
||||
# Reuse existing labels: hide all and add to pool
|
||||
@@ -164,7 +164,7 @@ func get_list_of_soundtracks() -> void:
|
||||
for soundtrack: String in soundtracks:
|
||||
add_soundtrack_reuse(soundtrack)
|
||||
else:
|
||||
print("Unexpected data")
|
||||
GameLog.warning("Unexpected data")
|
||||
MusicServerClient.fetch_all_soundtracks_ordered(handle_soundtracks)
|
||||
|
||||
## Replaces the searchable soundtracks and precomputes their search forms.
|
||||
|
||||
Reference in new issue
Block a user