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

Godot Advanced Logger (C#)

An asset by Shotix
The page banner background of a mountain and forest
Godot Advanced Logger (C#) thumbnail image
Godot Advanced Logger (C#) thumbnail image
Godot Advanced Logger (C#) thumbnail image
Godot Advanced Logger (C#) hero image

Quick Information

0 ratings
Godot Advanced Logger (C#) icon image
Shotix
Godot Advanced Logger (C#)

Elevate your Godot 4.x C# projects with a robust, high-performance, and structured logging framework. Moving beyond standard GD.Print console outputs, this plugin introduces an enterprise-grade logging architecture explicitly designed for the demands of game development.Whether you are debugging a complex combat system or monitoring a live multiplayer server, Godot Advanced Logger provides the clarity and performance you need.------Core Features include:- In-Game Debug Screen: A toggleable, right-aligned overlay to read logs directly inside your standalone game exports. Fully extensible via the IDebugPanel API to add your own custom developer tools.- Zero-Allocation Architecture: Built from the ground up to prevent garbage collector (GC) spikes, ensuring your game maintains stable frame rates even under heavy logging loads. - Structured Data Logging: Go beyond flat text. Log complex data structures and variables as JSON for precise debugging and parsing. - Real-Time Streaming: Seamlessly stream logs in real-time to external dashboards like Seq for advanced filtering, monitoring, and live analytics. - Multi-Channel Output: Route your logs to multiple destinations simultaneously. Console, local files, or remote servers. - Contextual Loggers: Create specialized logger instances (e.g., a CombatLogger) that automatically attach relevant contextual metadata to every log entry. - Zero-Cost Debugging: Debug() calls utilize C#'s [Conditional("DEBUG")] attribute. In your final Release builds, the compiler completely strips these calls, ensuring zero CPU overhead and memory allocation.- Production Safe: Automatically detects Release exports (OS.IsDebugBuild()) and hard-disables developer tools (like the UI and network writers) while intelligently throttling log verbosity based on separate Editor/Release settings.------The framework is highly modular, allowing you to plug in the exact output methods your project requires:- ConsoleWriter: Cleanly formatted, color-coded output directly within the Godot editor console. - FileWriter: Traditional plain-text logs for historical archiving and local debugging. - JsonFileWriter: Machine-readable log files perfect for automated crash analysis and parsing. - SeqHttpWriter: Professional remote logging via HTTP for centralized, live log management.- DebugScreenWriter: Directly writes any log messages into the In-Game Debug Screen.

Supported Engine Version
4.0
Version String
2.0.1
License Version
MIT
Support Level
community
Modified Date
17 days ago
Git URL
Issue URL

Godot Advanced Logger (C#)

Godot Advanced Logger is a robust, high-performance, and structured logging framework designed specifically for Godot 4.x C# projects.

Moving beyond standard GD.Print console outputs, this plugin introduces a standard logging architecture. It is built from the ground up to prevent garbage collector spikes (Zero-Allocation), support structured data (JSON), and stream logs in real-time to external dashboards like Seq.

Key Features

  • Zero-Allocation Architecture: Uses readonly record struct and pre-evaluation checks (IsEnabled) to ensure disabled logs consume zero string formatting or memory allocation, preventing GC stutters.
  • Structured Logging: Stop parsing messy text strings. Send exact data points (e.g., attackDamage = 150) via C# Dictionaries, making your logs fully searchable and filterable in external tools like Seq.
  • Multi-Target Output: Write simultaneously to:
    • Godot Console (with Rich Text BBCode colors)
    • Text Files (.txt for quick reading)
    • JSON Lines Files (.jsonl for programmatic parsing)
    • Seq HTTP Server (Real-time dashboard streaming)
  • Godot UI Integration: Toggle writers and configure API keys directly within Godot's Project Settings. No code changes required.

Installation

  1. Download the repository.
  2. Copy the addons/godot_advanced_logger directory into your project's addons/ folder.
  3. Build your C# solution (Project -> Tools -> C# -> Build).
  4. Navigate to Project Settings -> Plugins and enable "Godot Advanced Logger".
  5. Test the plugin with the examples found in the addons/godot_advanced_logger/examples directory.

Note: This plugin requires a Godot project initialized with C# (.NET) support.

Configuration

Once enabled, you can configure the logger visually. Go to Project Settings -> General -> Addons -> Godot Advanced Logger. Here you can:

  • Set the minimum Log Level (e.g., Info, Warning).
  • Mute noisy channels.
  • Enable/Disable specific Writers (Console, File, JSON, Seq).
  • Set your Seq Server URL.

Usage Guide

Basic vs. Structured Logging

The traditional way of logging forces you to bake variables into a string. This is slow and hard to search later.

// BAD: Allocates memory even if Debug is disabled, hard to search later
LogManager.Debug($"Player {playerName} took {damage} damage from {enemy}.");

The Advanced Logger Way: Separate the message from the data.

// GOOD: Clean message, searchable data, zero allocations if Info is muted
LogManager.Info("Player Damaged", new Dictionary<string, object> 
{
    { "PlayerName", playerName },
    { "Damage", damage },
    { "EnemyType", enemy }
});

Context Loggers (Best Practice)

For larger projects, create dedicated Loggers for your systems by inheriting from ContextLogger. This encapsulates logic and channels.

using Godot;
using System.Collections.Generic;
using GodotAdvancedLogger; // Adjust namespace to match your project

public class CombatLogger : ContextLogger
{
    // Tag all logs from this class with the "Combat" channel
    public CombatLogger() : base("Combat") { }

    public void LogAttack(string attacker, string target, int damage, bool isCritical)
    {
        // 1. Performance Gate: Abort immediately if this level is muted!
        LogLevel level = isCritical ? LogLevel.Warning : LogLevel.Info;
        if (!IsEnabled(level)) return;

        // 2. Build structured data
        var context = new Dictionary<string, object>
        {
            { "Attacker", attacker },
            { "Target", target },
            { "Damage", damage },
            { "IsCritical", isCritical }
        };

        // 3. Log
        if (isCritical) Warning("Critical Hit Executed", context);
        else Info("Attack Executed", context);
    }
}

This plugin includes native support for Seq, a free, local log server that acts as a real-time database for your game.

  1. Start Seq locally via Docker:
docker run \
  --name seq \
  -d \
  --restart unless-stopped \
  -e ACCEPT_EULA=Y \
  -e SEQ_FIRSTRUN_ADMINPASSWORD=<password> \
  -v <local path to store data>:/data \
  -p 5341:80 \
  datalust/seq
  1. In Godot, go to Project Settings -> Addons -> Godot Advanced Logger and check Enable Seq.
  2. Run your game and open http://localhost:5341 in your browser.
  3. Watch your logs stream in live. Use the search bar to query your game data instantly: (e.g., Channel = 'Combat' and Damage > 50)

Note: Replace the placeholders <password> and <local path to store data> with your local settings.

License

This project is licensed under the MIT License.

Elevate your Godot 4.x C# projects with a robust, high-performance, and structured logging framework. Moving beyond standard GD.Print console outputs, this plugin introduces an enterprise-grade logging architecture explicitly designed for the demands of game development.

Whether you are debugging a complex combat system or monitoring a live multiplayer server, Godot Advanced Logger provides the clarity and performance you need.

------

Core Features include:

- In-Game Debug Screen: A toggleable, right-aligned overlay to read logs directly inside your standalone game exports. Fully extensible via the IDebugPanel API to add your own custom developer tools.

- Zero-Allocation Architecture: Built from the ground up to prevent garbage collector (GC) spikes, ensuring your game maintains stable frame rates even under heavy logging loads.

- Structured Data Logging: Go beyond flat text. Log complex data structures and variables as JSON for precise debugging and parsing.

- Real-Time Streaming: Seamlessly stream logs in real-time to external dashboards like Seq for advanced filtering, monitoring, and live analytics.

- Multi-Channel Output: Route your logs to multiple destinations simultaneously. Console, local files, or remote servers.

- Contextual Loggers: Create specialized logger instances (e.g., a CombatLogger) that automatically attach relevant contextual metadata to every log entry.

- Zero-Cost Debugging: Debug() calls utilize C#'s [Conditional("DEBUG")] attribute. In your final Release builds, the compiler completely strips these calls, ensuring zero CPU overhead and memory allocation.

- Production Safe: Automatically detects Release exports (OS.IsDebugBuild()) and hard-disables developer tools (like the UI and network writers) while intelligently throttling log verbosity based on separate Editor/Release settings.

------

The framework is highly modular, allowing you to plug in the exact output methods your project requires:

- ConsoleWriter: Cleanly formatted, color-coded output directly within the Godot editor console.

- FileWriter: Traditional plain-text logs for historical archiving and local debugging.

- JsonFileWriter: Machine-readable log files perfect for automated crash analysis and parsing.

- SeqHttpWriter: Professional remote logging via HTTP for centralized, live log management.

- DebugScreenWriter: Directly writes any log messages into the In-Game Debug Screen.

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
Godot Advanced Logger (C#) icon image
Shotix
Godot Advanced Logger (C#)

Elevate your Godot 4.x C# projects with a robust, high-performance, and structured logging framework. Moving beyond standard GD.Print console outputs, this plugin introduces an enterprise-grade logging architecture explicitly designed for the demands of game development.Whether you are debugging a complex combat system or monitoring a live multiplayer server, Godot Advanced Logger provides the clarity and performance you need.------Core Features include:- In-Game Debug Screen: A toggleable, right-aligned overlay to read logs directly inside your standalone game exports. Fully extensible via the IDebugPanel API to add your own custom developer tools.- Zero-Allocation Architecture: Built from the ground up to prevent garbage collector (GC) spikes, ensuring your game maintains stable frame rates even under heavy logging loads. - Structured Data Logging: Go beyond flat text. Log complex data structures and variables as JSON for precise debugging and parsing. - Real-Time Streaming: Seamlessly stream logs in real-time to external dashboards like Seq for advanced filtering, monitoring, and live analytics. - Multi-Channel Output: Route your logs to multiple destinations simultaneously. Console, local files, or remote servers. - Contextual Loggers: Create specialized logger instances (e.g., a CombatLogger) that automatically attach relevant contextual metadata to every log entry. - Zero-Cost Debugging: Debug() calls utilize C#'s [Conditional("DEBUG")] attribute. In your final Release builds, the compiler completely strips these calls, ensuring zero CPU overhead and memory allocation.- Production Safe: Automatically detects Release exports (OS.IsDebugBuild()) and hard-disables developer tools (like the UI and network writers) while intelligently throttling log verbosity based on separate Editor/Release settings.------The framework is highly modular, allowing you to plug in the exact output methods your project requires:- ConsoleWriter: Cleanly formatted, color-coded output directly within the Godot editor console. - FileWriter: Traditional plain-text logs for historical archiving and local debugging. - JsonFileWriter: Machine-readable log files perfect for automated crash analysis and parsing. - SeqHttpWriter: Professional remote logging via HTTP for centralized, live log management.- DebugScreenWriter: Directly writes any log messages into the In-Game Debug Screen.

Supported Engine Version
4.0
Version String
2.0.1
License Version
MIT
Support Level
community
Modified Date
17 days 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