Picking the variant
Use the no-log-compat if this is your only rust gdextension OR none of your gdextensions use the "log" crate. You can use the log-compat variant if you are not sure about the above or if one of your rust gdextensions uses the "log" crate.
How to use
These examples below have been tested in Godot and should work.
var SCRIPT_PATH := Log.get_script_path(self)
func _ready() -> void:
const fname := "_ready"
Log.trace("This is a trace message :3", SCRIPT_PATH, fname)
Log.debug("Debugging ducks...", SCRIPT_PATH, fname)
Log.info("Scene changed to 'res://test.tscn'", SCRIPT_PATH, fname)
Log.warn("this thingy was wrong, so i corrected it from float to int", SCRIPT_PATH, fname)
Log.error("file at path 'user://data.json' doesn't exist, falling back to default >:3", SCRIPT_PATH, fname)
Log.fatal(2, "Something very wrong happened and can't fix it, quitting...", SCRIPT_PATH, fname) # This will quit synchronously
# you can also do this for a fatal or any log level:
#Log.log("log message", SCRIPT_PATH, Level.FATAL) # replace 'FATAL' with other log levels
Or if you want less writing:
func _ready() -> void:
var s := Span.span(self, "_ready")
s.trace("This is a trace message :3")
s.debug("Debugging ducks...")
s.info("Scene changed to 'res://test.tscn'")
s.warn("this thingy was wrong, so i corrected it from float to int")
s.error("file at path 'user://data.json' doesn't exist, falling back to default >:3")
s.fatal(2, "Something very wrong happened and can't fix it, quitting...") # This will quit synchronously
# you can also do this for a fatal or any log level:
#s.log("log message", Level.FATAL) # or other log levels
Example log output from examples above:
Initializing NovaLogger :3
0:00:00:674:179us Debug rust:nova_logger:src/fatal_handler_singleton.rs:42 Updating addons/nova_logger/quit_function_name property info
0:00:00:701:656us Trace godot:res://example.gd:_ready This is a trace message :3
0:00:00:701:801us Debug godot:res://example.gd:_ready Debugging ducks...
0:00:00:701:860us Info godot:res://example.gd:_ready Scene changed to 'res://test.tscn'
0:00:00:701:967us Warn godot:res://example.gd:_ready this thingy was wrong, so i corrected it from float to int
0:00:00:702:107us Error godot:res://example.gd:_ready file at path 'user://data.json' doesn't exist, falling back to default >:3
0:00:00:702:243us Fatal godot:res://example.gd:_ready Something very wrong happened and can't fix it, quitting...
0:00:00:702:392us Info rust:nova_logger:src/fatal_handler_singleton.rs:110 Calling 'quit' in main loop 'SceneTree' to fatal quit
Colored Godot output:

INFO ABOUT USING THE FATAL VERSION
If you use a MainLoop different than SceneTree you will probably need to change addons/nova_logger/quit_function_name to match the quit function of your main loop.
If you don't know what a MainLoop is in Godot and use the normal Godot scenes and nodes you probably don't need to change this. :3
Other features
Easy script path getting:
Log.get_script_path(object)- gets the script path from the given object, if object has no path, then returns"<unknown>"
Min log level setting:
Log.set_min_log_level(Level.LEVEL)- setting this to Level.INFO will only make the logger print Info and above, used for changing the log level at runtimeaddons/nova_logger/max_log_level- Setting for doing the above, but in ProjectSettings, recommended to use this as the base and changing usingLog.set_min_log_level()on runtime (if needed)
Customizable log save path
addons/nova_logger/logger/log_dir_path- setting for setting the directory to save the logs inaddons/nova_logger/logger/max_logs_size- setting for how many logs to store in the log bufferaddons/nova_logger/logger/log_file_name- name of the log file, example name with variables:novalog-{date}-{time}.log
Getting the logs for a logger window
NovaLogger.get_logs(
level: Level, // min log level
language: String, // language or environment, for godot logs it's "godot", for rust it's "rust"
source: String, // source of the log, in godot it's file path, in rust it's module path
path: String, // path of the log, in godot it's function name, in rust it's file path
line: int = -1, // -1 means any line
limit_logs: i32, // returns 1k logs by default
) -> Array<NovaLog> - example godot logger window: window_test.gd :3
Using in other Godot-Rust GDExtensions
To add it to your GDExtension all you need to do is cargo add nova_logger -F manual-init-deinit. The Manual init deinit feature is required for it to work inside a different gdextension. :3
Don't forget to initialize the logger in lib.rs:
use godot::prelude::*;
// Import NovaLogger :3
use nova_logger::NovaLogger;
struct YourExtension;
#[gdextension]
unsafe impl ExtensionLibrary for YourExtension {
fn on_stage_init(stage: InitStage) {
// Intialize the logger :3
NovaLogger::init(&stage);
}
fn on_stage_deinit(stage: InitStage) {
// Deintialize the logger :3
NovaLogger::deinit(&stage);
}
}
Issues
If you find any issues, please report them on the source code repository with the needed minimal code to reproduce.
Changelog for version v0.3.1-log-compat
2026-09-08 15:10:24
No changelog provided for this version.