Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Better Debug Logging

An asset by liack
The page banner background of a mountain and forest
Better Debug Logging thumbnail image
Better Debug Logging thumbnail image
Better Debug Logging thumbnail image
Better Debug Logging hero image

Quick Information

0 ratings
Better Debug Logging icon image
liack
Better Debug Logging

An add-on that enhances the debugging experience in the console by providing formatted, color-coded log messages. This tool displays messages in the following format: [MESSAGE SOURCE]-TYPE: message, assigning an identifying color based on the message type.

Supported Engine Version
4.5
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
6 hours ago
Git URL
Issue URL

Better Debug Logging

Godot 4 plugin that extends the console debugging system with formatted messages, colors, and log levels.

Features

  • Formatted messages with colors in the editor console (print_rich)
  • Three log levels: INFO, WARNING, ERROR
  • WARNING and ERROR levels also log via push_warning() / push_error()
  • Channel system (independent loggers with custom prefixes)
  • Global registry (LoggerRegistry) available as an autoload singleton
  • Two implementations: DebugLogger (RefCounted) and Logger (Node)

Installation

  1. Copy the better_debug_logging folder into your project's res://addons/.
  2. Enable the plugin in Project > Project Settings > Plugins.

The plugin will automatically register the LoggerRegistry singleton.

Usage

LoggerRegistry (global autoload)

# Default logger with "DEBUG" prefix
LoggerRegistry.get_default().info("Game started")
LoggerRegistry.get_default().warning("Low memory available")
LoggerRegistry.get_default().error("Failed to load resource")

# Channels with custom prefix
var combat_logger = LoggerRegistry.channel("COMBAT")
combat_logger.info("Player attacks for 50 damage")

DebugLogger (direct instance)

var log = DebugLogger.new("MY_MODULE")
log.info("This is an informational message")
log.warning("This is a warning")
log.error("This is an error")

# Print a message without prefix or level
log.simple("Plain unformatted message")

# Hide the prefix
log.set_prefix_visible(false)

API

DebugLogger

Method Description
info(...args) INFO level log (cyan)
warning(...args) WARNING level log (yellow) + push_warning()
error(...args) ERROR level log (red) + push_error()
simple(...args) Plain unformatted message
set_prefix_visible(enabled) Show/hide the prefix

LoggerRegistry

Method Description
get_default() Returns the default logger (DEBUG)
channel(name) Gets or creates a logger with the given prefix

Colors by level

  • INFO → cyan
  • WARNING → yellow
  • ERROR → red

License

MIT - See LICENSE.

An add-on that enhances the debugging experience in the console by providing formatted, color-coded log messages. This tool displays messages in the following format: [MESSAGE SOURCE]-TYPE: message, assigning an identifying color based on the message type.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Better Debug Logging icon image
liack
Better Debug Logging

An add-on that enhances the debugging experience in the console by providing formatted, color-coded log messages. This tool displays messages in the following format: [MESSAGE SOURCE]-TYPE: message, assigning an identifying color based on the message type.

Supported Engine Version
4.5
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
6 hours ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers