My plugin called GoLogger released on the Asset Library. I made a logging system for my projects that enables you to log and store game events + data in external .log files. You can get it from the Asset Library or GitHub.
GoLogger will log any game event and/or data into an external .log file, any data that can be converted into a string can be added. Instead of writing print() calls that clutter the Output and becomes difficult to manage, you can instead log that same data and access the file when you need it rather than have it printed every time. Additionally, GoLogger can help your released products to help investigate bugs and issues. Because the .log files generated by the plugin are saved in the external directory user://logs/x_Gologs/x.log. These files are accessible to your players/users as well which they can include when bug reporting.
Creating log entries is as easy as writing a print() statement and can be done from any script in your project. Just use Log.entry(str("Your log entry message - ", data), 0) which will automatically add a timestamp to your entry.
Yes and it wouldn’t require any modifications. Any data that can be converted into a string format can be logged using str() with Log.entry(str(any_data)), you can store the save data. You can store multiple data per entry but I’d suggest setting up a loop to store one per entry.
Regarding the modification part of your question. GoLogger will not log anything or store data out of the box. Simply installing it adds the framework to your project but will not log anything on its own. You need to add Log.entry() statements when/wherever you want to log. That means you wouldn’t require any modifications to only store certain data since you have to define the data it stores regardless. Here’s an example of how you could store data from an array:
var data: Array[int] = [0, 1, 2]
func _ready():
for i in range(data.size()):
Log.entry(str("Save Data: ", data[i]))
### Result ###
[2024-10-14_19-15-52] Save Data: 0
[2024-10-14_19-15-52] Save Data: 1
[2024-10-14_19-15-52] Save Data: 2
Beware. If you’re looking to use GoLogger as your save system, I wouldn’t recommend it. The purpose of this plugin is to log and customize events and data into a legible format in an external .log file for you as a developer to see the course of events in your project. It was not built to extract data from the .log files. While it’s certainly possible, it would arguably be more work to rework the plugin rather than creating a save system by yourself.
Update 1.2 of GoLogger was just released! The entire plugin was refactored and includes a new workflow with a bottom dock panel and new category system. This changed the plugin from a basic framework to a more feature complete plugin with code free workflow.
You can see all the changes in the update on Github and download it there. I’m holding off on updating the Asset Library page for a bit just to see if there’s any installation issues or bug reports. On that note, please create an issue on the Github repo if you encounter any problems or just want to leave any feedback(good or bad)!