Chickensoft.Log.Godot
1.0.70
See the version list below for details.
dotnet add package Chickensoft.Log.Godot --version 1.0.70
NuGet\Install-Package Chickensoft.Log.Godot -Version 1.0.70
<PackageReference Include="Chickensoft.Log.Godot" Version="1.0.70" />
<PackageVersion Include="Chickensoft.Log.Godot" Version="1.0.70" />
<PackageReference Include="Chickensoft.Log.Godot" />
paket add Chickensoft.Log.Godot --version 1.0.70
#r "nuget: Chickensoft.Log.Godot, 1.0.70"
#:package Chickensoft.Log.Godot@1.0.70
#addin nuget:?package=Chickensoft.Log.Godot&version=1.0.70
#tool nuget:?package=Chickensoft.Log.Godot&version=1.0.70
🪵 Log.Godot
Opinionated logging for C# in Godot, based on Chickensoft.Log.
<p align="center"> <img alt="Chickensoft.Log.Godot" src="Chickensoft.Log.Godot/icon.png" width="200"> </p>
📦 Installation
For logging in pure C# without Godot, see Chickensoft.Log. Note that the TraceWriter from
Chickensoft.Log will produce output in Godot's console.
Install the latest version of the Chickensoft.Log.Godot and Chickensoft.Log packages from nuget:
dotnet add package Chickensoft.Log
dotnet add package Chickensoft.Log.Godot
🌱 Usage
Essentials
For an overview of the logging system, see Chickensoft.Log. This package provides Chickensoft.Log-compatible writers for output to the Godot debug console and Godot file paths.
If you are using TraceWriter from the Chickensoft.Log package, you probably should not also use a GDWriter for output to the Godot debug console in the same log! Godot uses a custom TraceListener to pick up .NET messages directed through Trace, so any messages sent to a TraceWriter will already be directed to the Godot console when run in Godot. Using GDWriter will only create doubled output.
Setup
public class MyClass
{
// Create a log with the name of MyClass, outputting to the Godot debug console
private ILog _log = new Log(nameof(MyClass), new GDWriter());
}
Logging
public void MyMethod()
{
// Outputs "Info (MyClass): A log message"
_log.Print("A log message");
// Outputs "Warn (MyClass): A warning message"
_log.Warn("A warning message");
// Outputs "Error (MyClass): An error occurred"
_log.Err("An error occurred");
try
{
SomethingThatThrows();
}
catch (Exception e)
{
// Outputs the value of e.ToString(), prefixed by a line labeling it an
// exception, as an error
_log.Print(e);
}
// Outputs the current stack trace as a standard log message
_log.Print(new System.Diagnostics.StackTrace());
}
For details on formatting log messages, see Chickensoft.Log.
✒️ Writer Types
The Chickensoft.Log.Godot package provides two writer types for use with Godot:
GDWriter: Outputs log messages to the Godot console.GDFileWriter: Outputs log messages to file using Godot's file I/O system, to support writing files to Godot's"res://"and"user://"paths. By default,GDFileWriterwill write to"user://output.log", but you can either configure a different default, or configure individualGDFileWriters to write to particular files on creation. To avoid concurrency issues,GDFileWriteris implemented as a pseudo-singleton with a single instance per file name.
Using GDFileWriter
Create a log that outputs messages to the default filename "user://output.log":
public class MyClass
{
private ILog _log = new Log(nameof(MyClass), GDFileWriter.Instance());
}
Create a log that outputs messages to a custom filename:
public class MyClass
{
private ILog _log = new Log(nameof(MyClass),
GDFileWriter.Instance("user://CustomFileName.log"));
}
Change the default filename for GDFileWriters:
public class Entry
{
public static void Main()
{
// Change the default filename for GDFileWriter before any writers are created
GDFileWriter.DefaultFileName = "user://MyDefaultFileName.log";
}
}
public class MyClass
{
private ILog _log = new Log(nameof(MyClass), GDFileWriter.Instance());
}
Changing the default value for the log file name will affect newly-created
GDFileWriters, but will not affect ones that already exist.
💁 Getting Help
Having issues? We'll be happy to help you in the Chickensoft Discord server.
🐣 Package generated from a 🐤 Chickensoft Template — https://chickensoft.games
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Chickensoft.Log (>= 2.0.0)
- GodotSharp (>= 4.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.72 | 98 | 4/2/2026 |
| 1.0.71 | 85 | 4/1/2026 |
| 1.0.70 | 112 | 3/11/2026 |
| 1.0.69 | 92 | 3/11/2026 |
| 1.0.68 | 210 | 2/17/2026 |
| 1.0.67 | 97 | 2/17/2026 |
| 1.0.65 | 163 | 1/26/2026 |
| 1.0.64 | 142 | 1/15/2026 |
| 1.0.63 | 110 | 1/14/2026 |
| 1.0.62 | 718 | 12/3/2025 |
| 1.0.61 | 693 | 12/1/2025 |
| 1.0.60 | 202 | 11/27/2025 |
| 1.0.59 | 393 | 11/21/2025 |
| 1.0.58 | 415 | 11/20/2025 |
| 1.0.57 | 419 | 11/19/2025 |
| 1.0.56 | 319 | 11/13/2025 |
| 1.0.55 | 296 | 11/13/2025 |
| 1.0.54 | 313 | 11/8/2025 |
| 1.0.53 | 174 | 11/8/2025 |
| 1.0.52 | 216 | 10/16/2025 |
Chickensoft.Log.Godot release.