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:
Sansan committed 2026-10-06 11:15:03 +02:00
1 parent 5cdec5cc8f
commit 5831e1e73d
20 files changed
+137 -89

No files matched your search

+5 -5
View File
@@ -83,7 +83,7 @@ func show_section_if_has_data(data: Variant, vbox: VBoxContainer, separator: VSe
return false
func start_sync() -> void:
print("start_sync")
GameLog.debug("start_sync")
self.visible = true
if has_synced:
# Already synced, just show the results
@@ -98,10 +98,10 @@ func start_sync() -> void:
MusicServerClient.start_sync(sync_request_sent)
func _on_sync_timeout() -> void:
print("_on_sync_timeout!")
GameLog.debug("_on_sync_timeout!")
var get_progress: Callable = func get_progress(data_received: Dictionary) -> void:
print("get_progress")
print("data_received: ", data_received)
GameLog.debug("get_progress")
GameLog.debug("data_received: ", data_received)
if data_received != null:
if data_received.has("progress"):
sync_progress_bar.value = int(data_received.progress)
@@ -176,7 +176,7 @@ func on_sync_finished(data_received: Dictionary) -> void:
sync_time.text = "Total time: " + data_received.total_time if data_received.has("total_time") else ""
Settings.currently_syncing = false
sync_timer.stop()
print("sync finished")
GameLog.debug("sync finished")
show_sync_result()
restart_sync_button.visible = true
sync_finished.emit()