Chickensoft.GoDotLog
1.0.2-godot.4.beta.16
.NET 6.0
This is a prerelease version of Chickensoft.GoDotLog.
dotnet add package Chickensoft.GoDotLog --version 1.0.2-godot.4.beta.16
NuGet\Install-Package Chickensoft.GoDotLog -Version 1.0.2-godot.4.beta.16
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chickensoft.GoDotLog" Version="1.0.2-godot.4.beta.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chickensoft.GoDotLog --version 1.0.2-godot.4.beta.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Chickensoft.GoDotLog, 1.0.2-godot.4.beta.16"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chickensoft.GoDotLog as a Cake Addin
#addin nuget:?package=Chickensoft.GoDotLog&version=1.0.2-godot.4.beta.16&prerelease
// Install Chickensoft.GoDotLog as a Cake Tool
#tool nuget:?package=Chickensoft.GoDotLog&version=1.0.2-godot.4.beta.16&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GoDotLog
Opinionated Godot logging interface and console implementation.
public class MyEntity {
// Create a log which outputs messages prefixed with the name of the class.
private ILog _log = new GDLog(nameof(MyClass));
}
Logs can perform a variety of common actions (and output messages if they fail automatically):
_log.Print("My message");
_log.Warn("My message");
_log.Err("My message");
// Run a potentially unsafe action. Any errors thrown from the action will
// be output by the log. An optional error handler callback can be provided
// which will be invoked before the exception is rethrown.
_log.Run(
() => { _log.Print("Potentially unsafe action"); },
(e) => {
_log.Err("Better clean up after myself...whatever I did failed.");
}
);
// Throw an assertion exception with the given message if the assertion fails.
_log.Assert(node.Name == "MyNode", "Must be valid node name.");
// Return the value of a function or a fallback value.
var result = _log.Always<T>(
() => new Random().Next(0, 10) > 5 ? "valid value" : null,
"fallback value"
);
// Print a decently formatted stack trace.
_log.Print(new StackTrace());
Contributing
For information on contributing, see CONTRIBUTING.md.
Product | Versions |
---|---|
.NET | net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Godot.SourceGenerators (>= 4.0.0-beta.16)
- GodotSharp (>= 4.0.0-beta.16)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Chickensoft.GoDotLog:
Package | Downloads |
---|---|
Chickensoft.GoDotNet
State machines, notifiers, and other utilities for C# Godot development. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.2-godot.4.beta.16 | 63 | 1/30/2023 |
1.0.2-beta8 | 74 | 12/17/2022 |
1.0.2-beta6 | 65 | 11/24/2022 |
1.0.2-beta3 | 59 | 10/29/2022 |
1.0.2-beta1 | 88 | 9/17/2022 |
1.0.2-beta.4.0.0.17 | 43 | 2/6/2023 |
1.0.1-beta1 | 78 | 9/17/2022 |
1.0.0-beta1 | 77 | 9/17/2022 |
0.0.5 | 1,046 | 6/20/2022 |
0.0.4 | 965 | 6/18/2022 |
0.0.3 | 282 | 6/18/2022 |
0.0.2 | 282 | 6/18/2022 |
0.0.1 | 281 | 6/18/2022 |
Initial release.