
Publisher
zeeweasel
LogDuck - Your Logging Buddy for Godot 4.x
A straight-forward logging addon for Godot 4.x to centralize and customize your Debug output for your project. - Customizable rich-text console outputs with BBCode. - Class name detection (GDScript) - Toggleable logging levels: Debug, Warning, Error. - Show full stack or last stack_frame for each LogLevel individually - Instance numbering to differentiate the ouput from different instances - Output of systems specs to console - Can be used in other editor scripts - Many settings, to make sure...
LogDuck for Godot 4
A straight-forward logging addon for Godot 4.x to centralize and manage your Debug output for your project.
Report Bug • Request Features • Discord Server
Installation
LogDuck can be installed either: 1) through the Godot AssetLib or 2) manually by download the .zip file and extract the LogDuck folder into your addons folder in your Godot Project. Once you have installed the library, navigate to Project Settings -> Globals and enable the LogDuck plugin checkbox.Inside of LogDuckSettings.gd are all settings to customize how you'd like LogDuck to behave. Every entry has a short explanation what it does. By default LogDuck will push warnings and errors automatically into the Debugger and rich output is enabled.
Alternatively, you can take the LogDuck.gd script and drag it into your project, and add it as an autoloaded script. Make sure to set it as high as possible in the Load Order, so it can be ready for other autoloaded scripts.
Note: You can adjust the desired class name either inside of plugin.gd or inside the autoloaded script list, if you prefer a different way to call the logger. (Log.d() instead of LogDuck.d() for example)
Version
Currently LogDuck supports Godot 4.0.1+ with GDScript. I have yet to look into making sure it plays along nicely with C# scripts. If you'd like to tackle that, feel free to contribute!
Using LogDuck
By default, LogDuck will output anything sent to LogDuck with d() w() and e() into the output / console, errors and warnings also into the Debugger if you are in the Editor. LogDuck, however, will not automatically catch any output sent to print(), printerr() or print_rich() calls. A careful Search and Replace of these functions with LogDuck.d, usually fixes this quickly.
For example:
# print("Log this error to the console")
[Join Discord Server](https://discord.gg/XSWkS2fWJc)