Meatcorps.Engine.Logging
0.1.17-preview.19
dotnet add package Meatcorps.Engine.Logging --version 0.1.17-preview.19
NuGet\Install-Package Meatcorps.Engine.Logging -Version 0.1.17-preview.19
<PackageReference Include="Meatcorps.Engine.Logging" Version="0.1.17-preview.19" />
<PackageVersion Include="Meatcorps.Engine.Logging" Version="0.1.17-preview.19" />
<PackageReference Include="Meatcorps.Engine.Logging" />
paket add Meatcorps.Engine.Logging --version 0.1.17-preview.19
#r "nuget: Meatcorps.Engine.Logging, 0.1.17-preview.19"
#:package Meatcorps.Engine.Logging@0.1.17-preview.19
#addin nuget:?package=Meatcorps.Engine.Logging&version=0.1.17-preview.19&prerelease
#tool nuget:?package=Meatcorps.Engine.Logging&version=0.1.17-preview.19&prerelease
Meatcorps.Engine.Logging
Configures Serilog for the Meatcorps engine and registers an
ILoggerFactory in the global ObjectManager so any engine module can resolve a logger.
Outputs to both the console and a daily rolling log file.
Setup
Call LoggingModule.Load() always as first, before loading other modules:
LoggingModule.Load();
var host = new GameHostBuilder() // Just an example
// ...
.Build();
That's it. The module configures Serilog internally and registers an ILoggerFactory in
GlobalObjectManager.
Log output
Console format:
12:34:56.789 [Debug] (MyNamespace.MyClass): Message
File — written to logs/<AssemblyName>-<date>.log next to the executable:
- Rolling interval: daily
- Max file size: 10 MB (rolls on size limit)
- Retained files: 7 days
Resolving a logger in engine code
Any class that has access to GlobalObjectManager can resolve a typed logger:
var loggerFactory = GlobalObjectManager.ObjectManager.Get<ILoggerFactory>();
var logger = loggerFactory!.CreateLogger<MyClass>();
logger.LogInformation("Game started");
logger.LogWarning("Low memory");
logger.LogError(ex, "Unhandled exception");
Notes
- Minimum log level is
Debug. LoggingModule.Load()should only be called once. Calling it multiple times will overwrite the previous Serilog configuration.- The log file path is resolved relative to the entry assembly location via
FileUtilities.GetFullPath.
License
MIT License
See LICENSE for details.
| 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
- Meatcorps.Engine.Core (>= 0.1.17-preview.19)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Logging.Console (>= 8.0.1)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Meatcorps.Engine.Logging:
| Package | Downloads |
|---|---|
|
Meatcorps.Engine.RayLib
Meatcorps.Engine is a lightweight, code-first game framework built on top of Raylib. This is the primary Meatcorps Engine RayLib package |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.17-preview.19 | 33 | 2/25/2026 |
| 0.1.17-preview.18 | 38 | 2/25/2026 |
| 0.1.17-preview.17 | 41 | 2/24/2026 |
| 0.1.16 | 100 | 2/20/2026 |
| 0.1.15 | 207 | 2/14/2026 |
| 0.1.14 | 197 | 2/14/2026 |
| 0.1.13 | 204 | 2/14/2026 |
| 0.1.11 | 201 | 2/14/2026 |
| 0.1.10 | 202 | 2/14/2026 |
| 0.1.9 | 212 | 1/12/2026 |
| 0.1.8 | 191 | 1/11/2026 |
| 0.1.7 | 188 | 1/10/2026 |
| 0.1.6 | 190 | 1/10/2026 |
| 0.1.5 | 190 | 1/10/2026 |
| 0.1.4 | 198 | 1/4/2026 |
| 0.1.0 | 332 | 1/4/2026 |