CFG2.LogLib 1.0.5

dotnet add package CFG2.LogLib --version 1.0.5
                    
NuGet\Install-Package CFG2.LogLib -Version 1.0.5
                    
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="CFG2.LogLib" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CFG2.LogLib" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="CFG2.LogLib" />
                    
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 CFG2.LogLib --version 1.0.5
                    
#r "nuget: CFG2.LogLib, 1.0.5"
                    
#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 CFG2.LogLib@1.0.5
                    
#: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=CFG2.LogLib&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=CFG2.LogLib&version=1.0.5
                    
Install as a Cake Tool

CFG2.Utils.LogLib

An opinionated logger. Those opinions include, but are not limited to:

  • A logger should be simple to configure (just dotnet add package CFG2.LogLib)
  • A logger should be simple to use (see example)
  • A logger should default as much as possible (see opinions above)

Usage Examples

Recommended Usage (With AppLib)

using CFG2.Utils.AppLib;

public class Program
{
    static void Main(string[] args)
    {
        App = new App();
        App.Log("Hello");
    }
}

Using LogLib independently (Without AppLib)

using CFG2.Utils.LogLib;

public class Program
{
    private static readonly Logger logger = Logger.Instance(@"C:\My\App");

    static void Main(string[] args)
    {
        logger.Warn("Hello");
    }
}

Using Trace without having an instance of a Logger

using CFG2.Utils.LogLib;

public class Program
{
    static void Main(string[] args)
    {
        Logger.Trace("Hello");
    }
}

Release Notes

1.0.5

  • Refactored to allow printing timestamp and level for Trace messages (now the default)

1.0.4

  • Added cleanup of old log entries via optional retentionDays param (defaults to 30)

1.0.0

  • Initial Release
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on CFG2.LogLib:

Package Downloads
CFG2.AppLib

Package Description

CFG2.HttpLib

Package Description

CFG2.SQLiteLib

Package Description

CFG2.SecLib

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 391 11/12/2025
1.0.4 213 11/8/2025
1.0.3 163 11/8/2025
1.0.2 172 11/8/2025
1.0.1 417 7/20/2025
1.0.0 325 7/10/2025