https://github.com/aragubas/taiyou-simple-log
A simple and elegant logging library for Godot projects!
https://github.com/aragubas/taiyou-simple-log
aragubas godot godot-engine godot4-5 logging simple-logging taiyou taiyou-log taiyou-simple-log
Last synced: 9 months ago
JSON representation
A simple and elegant logging library for Godot projects!
- Host: GitHub
- URL: https://github.com/aragubas/taiyou-simple-log
- Owner: aragubas
- License: mit
- Created: 2025-09-23T11:12:56.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-25T12:59:35.000Z (9 months ago)
- Last Synced: 2025-10-04T05:56:14.832Z (9 months ago)
- Topics: aragubas, godot, godot-engine, godot4-5, logging, simple-logging, taiyou, taiyou-log, taiyou-simple-log
- Language: C#
- Homepage: https://www.nuget.org/packages/aragubas.taiyou.simplelog/
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Taiyou Simple Log
A simple, configurable and elegant logging library for Godot 4.* C# projects!
By using static boolean variables, you can configure TaiyouSimpleLog to do behave how you want
TaiyouSimpleLog supports projects with and without Reflection (useful for Web/iOS/Android builds)
## Example
By default, TaiyouLog is configured, Color Messages and PrintRich disabled
```c#
Log.Debug(""); // Logs message into OS terminal and Godot's built in output
Log.Warning(""); // Logs message into Godot's built in debugger (if PrintRich is disabled) and OS terminal
Log.Error(""); // Logs message into Godot's built in debugger (if PrintRich is disabled) and OS terminal
```
## Customization
TaiyouSimpleLog has 7 static variables that can be changed:
1. NoColorMessages
1. PrintRich
1. PrintRichWarning
1. PrintRichError
1. DebugColor
1. WarningColor
1. ErrorColor
And 3 methods for resetting the colors to it's defaults
1. ResetDebugColor
1. ResetWarningColor
1. ResetErrorColor
### NoColorMessages
If enabled, the message part from the log output will not be colored
### PrintRich
If enabled, Warning and Error messages will not be logged into Godot's internal debugger, but rather on the OS's terminal/Godot's Output Window
### PrintRichWarning/PrintRichError
If enabled, Warning/Error messages will not be logged into Godot's internal debugger, but rather on the OS's terminal/Godot's Output Window
---
### Changing colors
You can also change the color set for Debug, Error and Warning (if PrintRich is enabled) by changing the respective variables in the ``Log.cs`` class
1. DebugColor
1. WarningColor
1. ErrorColor
Methods for restoring the default color is also available
1. ResetDebugColor()
1. ResetWarningColor()
1. ResetErrorColor()
---
### Example
Changing the color of a debug output to blue, and then restoring it back
```c#
Log.DebugColor = "#0000FF"; // Must be hexadecimal color codes
Log.Debug("Debug! but in blue");
Log.ResetDebugColor(); // Resets to the default color, hardcoded in the class
```
# Donations
If you like what you see and wants to help us develop more useful libraries, check out my funding platforms below!
Kofi (https://ko-fi.com/aragubas)
# License
This project has been licensed with the MIT license.
More information at [LICENSE.txt](LICENSE.txt)