CopperDevs.Logger 1.1.1

Prefix Reserved
dotnet add package CopperDevs.Logger --version 1.1.1
                    
NuGet\Install-Package CopperDevs.Logger -Version 1.1.1
                    
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="CopperDevs.Logger" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CopperDevs.Logger" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="CopperDevs.Logger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CopperDevs.Logger --version 1.1.1
                    
#r "nuget: CopperDevs.Logger, 1.1.1"
                    
#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.
#:package CopperDevs.Logger@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CopperDevs.Logger&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CopperDevs.Logger&version=1.1.1
                    
Install as a Cake Tool

CopperDevs.Logger

Simple, opinionated, logger utility

Logging Options

  • Include Timestamps: Should timestamps be logged alongside the message
    • bool
  • Simple Exceptions: Should exceptions logs include the full stack trace
    • bool
  • List Log Type: How lists should be printed to console
    • Direct: Directly convert the list object to a string
    • Multiple: Print each value of the list to its own line
    • Single: Formats the values of the list into a single line

Log Types

Code Example

Log.Debug("Debug log example");
Log.Info("Info log example");
Log.Runtime("Runtime log example");
Log.Network("Network log example");
Log.Success("Success log example");
Log.Warn("Warning log example");
Log.Error("Error log example");
Log.Critical("Critical log example");
Log.Audit("Audit log example");
Log.Trace("Trace log example");
Log.Security("Security log example");
Log.UserAction("User Action log example");
Log.Performance("Performance log example");
Log.Config("Config log example");
Log.Fatal("Fatal log example");

Logged Result

Console logged rendered result

Exception Logging

Code Example

try
{
    // having some recursion to add depth to the stack trace
    RecursiveExample(6, 0);
}
catch (Exception e)
{
    Log.Exception(e);
}

    
public static void RecursiveExample(int maxDepth, int currentDepth)
{
    if (currentDepth == 0)
        Log.Info($"Starting recursive loop with depth of {maxDepth}");

    Log.Debug($"Current depth of {currentDepth}");

    if (maxDepth >= currentDepth)
    {
        currentDepth++;
        
        RecursiveExample(maxDepth, currentDepth);
    }
    else
    {
        Log.Success($"Finished");

        throw new NullReferenceException("exception core");
    }
}

Logged Result

Console logged rendered result

List Logging

List Log Type - Direct Code Example

CopperLogger.ListLogType = ListLogType.Direct;
Log.Config($"Setting {nameof(CopperLogger.ListLogType)} to {ListLogType.Direct}");
        
Log.Debug(new List<string> { "list", "logging", "moment" });
Log.Debug(new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
Log.Debug(new[] { "list", "logging", "moment" });
Log.Debug(new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });

List Log Type - Direct Code Result

Console logged rendered result

List Log Type - Multiple Code Example

CopperLogger.ListLogType = ListLogType.Multiple;
Log.Config($"Setting {nameof(CopperLogger.ListLogType)} to {ListLogType.Multiple}");
        
Log.Debug(new List<string> { "list", "logging", "moment" });
Log.Debug(new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
Log.Debug(new[] { "list", "logging", "moment" });
Log.Debug(new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });

List Log Type - Multiple Code Result

Console logged rendered result

List Log Type - Single Code Example

CopperLogger.ListLogType = ListLogType.Single;
Log.Config($"Setting {nameof(CopperLogger.ListLogType)} to {ListLogType.Single}");
        
Log.Debug(new List<string> { "list", "logging", "moment" });
Log.Debug(new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
Log.Debug(new[] { "list", "logging", "moment" });
Log.Debug(new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });

List Log Type - Single Code Result

Console logged rendered result

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on CopperDevs.Logger:

Package Downloads
CopperDevs.DearImGui

Custom layering around ImGui.NET/DearImGui

CopperDevs.DearImGui.Renderer.OpenGl.SilkNet

Silk.net OpenGl renderer for my ImGui wrapper

CopperDevs.DearImGui.Renderer.Raylib

Base raylib renderer for my ImGui wrapper

CopperDevs.Core.Logging

Common files used in multiple projects of mine. This is an extension project that adds support for my custom logger class to ILoggingBuilder.

CopperDevs.Windowing

Simple windowing system abstraction

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 127 9/2/2025
1.1.0 126 9/2/2025
1.0.1 419 11/10/2024
1.0.0 330 8/28/2024