We have 10+ loggers for Godot so why another one? It was in the works :-/
Logger for Godot inspired by Log4J.
Have you ever wondered why Godot doesn't have a class based logger? Well, I did. So I made one.
Using one of the print*
statements to try remove a bug is a pain. You have to go through all your code and remove them again. With this logger you can just change the log level and all your debug statements will be ignored.
Download the latest release and put it in your addons
folder.
Add the addon to your autoload. Make sure its name is Log4Gd
and not its class name Log4GD
# Ask the autoloaded object for a new logger
var logger = Log4Gd.get_logger(__class_name, Log4GD.LogLevel.DEBUG)
func _ready():
logger.info("Hello World")
print(Log4Gd)