Repository navigation
Introducing GDLogger - GoLogger reworked and redesigned.
GDLogger has gotten a much needed facelift with a sleeker, simple, more uniform and professional appearance. The visuals are not the only improvements. While the core design of using categories to sort your important logs is still very much the same. Stripped of superfluous features and made into a much more concise and all around easier user experience.
GDLogger.mp4
Renaming motivation
Around the time version 1.2 was under development, I found that there was an already existing logging tool for the Go programming language with the name GoLogger. Since then, a name change have been considered and deliberated heavily, and with this new 2.0 rework and with GD being an established Godot specific term and close to the old name and . The time has come to finally rip the Bandaid off.
Logs Tab
Category tab -> Logs tab:
The Category tab has been reworked into featuring not only Categories as before, but you can now view your GDLogger files within the dock and even open and read them! Using the CheckBox in the side panel, you can choose whether to open log files within the editor as a Popup window, or using an external program like Notepad++.
Use the left/right arrow buttons below a category to either move and sort your categories(this is purely visual and doesn't change anything), or press the down arrow to open that category's .log files.
Default Category:
Additionally, while it's very nice to have categories to sort log entries. Often you have one overarching category like Game or General that takes entries from all over the place. Or perhaps you simply use one singular category and you don't feel like having to specify the category every time you call msg(). By checking the CheckBox next to the category name, you select that category as the default category and whenever you call msg() without defining the category_name parameter, the entry is logged into the default category.
Integrated Log Viewer
A new in-editor log viewer allows you to now see and open log files without ever having to leave the editor. You can customize the text as well and copy the contents to clipboard. If desired, you are also able to turn off Open filed in editor setting which instead opens the log file using the default application of your operating system(such as Notepad++).

Changed to resource-based plugin data/settings
Instead of saving plugin data in a .ini, .json or .cfg file. A resource-based solution has been implemented. This was changed for a variety of reasons, mainly due to storing, loading and handling data within a custom resource is much easier to handle and requires a lot less lines of code. The GLData resource is saved in each project directory and if you run into issues, you can easily open the resource in Godot and manually fix any issues. This change also enabled support for hot-swapping settings mid-session.
While the debate regarding the security of resource-based saving is endless. The simple fact is that no sensitive data stored in the resource and the upsides outweigh any potential downsides.
BREAKING CHANGE - Log.entry() is now Log.msg() and more
msg(log_msg : String, category_name: String = "", print_entry: bool = false)
Log.msg("NEW way of specifying categories.", "game")
Log.msg("NEW way of logging to designated Default Category.") # Not defining category name logs msg to Default Category
Log.entry("OLD way of specifying categories.", 0)Log.entry()is nowLog.msg(). This was done because the convention of other logging plugins and systems typically use 'msg', but also because it's easier, more comfortable to type and is shorter.- Category indices have been removed entirely in favor of specifying the category by name. This change was motivated by the fact that indices meant you had to remember/check which category had what index, which is very obtuse and frustrating. Instead, you now simply specify the category by name instead. Not specifying a
category_namewill log the msg to the default category(see paragraph below for more info). print_entrycan be used to print individual entries to Output.
This means existing Log.entry() calls are now broken when you update but it is easy to fix. Simply use 'Search and Replace' to correct this.
BREAKING CHANGE - Save Copy feature removed
The after careful deliberation, the Save Copy feature has been removed. While it does have its uses, it's ultimately too niche to justify the significant development and debugging time involved when a new update is being developed. It's core behavior can be somewhat replicated manually by using the hotkeys to restart a session.
Proper support for running multiple instances at once
Many thanks to @abderrahman504 with #25 for bringing attention to the fact that there's no way to differentiate between entries from multiple instances, as is often the case when debugging/testing multiplayer projects.
A new instance_id has been implemented. Each instance of your project will generate a random 5 character ID(much like UIDs) that you can use to mark entries with(see Customizable Log Header and Entry Formats section for more info on tags).
The instance_id can be shown in the viewport using the Display Instance ID(Ctrl + Shift + I). You are also able to change the visibility behavior of the instance_id. You have many options to customize the size, position and colors so the text is visible and doesn't block anything in your games.
Fully customizable log header and entry formats
You can now completely customize the format of both the log header and entries using tags. You can put any kind of string along with some tags to format the date and time stamps exactly how you want.
{category} - Category name is only available for Log Header
{entry} - The entry string, only available for Entry Format and IS REQUIRED
{instance_id} - Only available for Entry Format
{project_name} {version} - Project name and version fetched from ProjectSettings
{yy} {mm} {dd} - Year, month and day
{hh} {mi} {ss} - Hour, minute and seconds
Dock follows theme colors
The dock
Changelog:
- Name changed to GDLogger from GoLogger
- Resource-based saving of plugin data/settings.
- Changes to
Log.entry()->Log.msg(log_entry: String, category_name: String = "", print_entry: bool = false)- Specifying the category by
category_indexhas been replaced withcategory_namestring. print_entryallows you to optionally print individual entries.
- Specifying the category by
- Default category is a checkbox you can mark a category as. When a
category_nameisn't passed in when callingLog.entry(). The default category is then used. - #25 Instance ID system implemented to support for multiple instances running simultaneously.
- Use
Ctrl + Shift + Ito display the ID of an instance(you can optionally print the ID to output with the hotkey as well). - `ID Overlay settings allows you to customize the look of the overlay text.
- Use
snake_caseand_for spaces are enforced for category names.- New settings to allow you to customize the format of
Log HeaderandEntry Format. Allowing you to set custom strings and format date- and timestamps to your preference/region. - Sleeker, cleaner and more uniform look across the board.
- Hotkey resources has been consolidated into one and can be edited in the Settings tab.
- In-dock help section has been improved and rewritten to be more concise and neutral.
- Removed or changed superfluous features:
- Signals
session_started/endedconsolidated into onesession_toggled(toggled_on: bool)signal - Signals
session_timer_started/ended- Thesession_toggledsignal already serves the same purpose. - 'Save Copy' feature
- Lock category button
- Error reporting level setting
- Signals