devcutler.Firewood 1.0.0

dotnet add package devcutler.Firewood --version 1.0.0                
NuGet\Install-Package devcutler.Firewood -Version 1.0.0                
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="devcutler.Firewood" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add devcutler.Firewood --version 1.0.0                
#r "nuget: devcutler.Firewood, 1.0.0"                
#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 devcutler.Firewood as a Cake Addin
#addin nuget:?package=devcutler.Firewood&version=1.0.0

// Install devcutler.Firewood as a Cake Tool
#tool nuget:?package=devcutler.Firewood&version=1.0.0                

Firewood

Usage

Instantiating
using Firewood;

Logger log = new Logger(LogLevel.Info);
Basic usage
log.Log(LogLevel.Info, "Beans on toast?");
// Info: Beans on toast?

log.Log(LogLevel.Warn, "I do like beans on toast...");
// Warn: I do like beans on toast...

// this one won't show up because Info is lower than Trace
log.Log(LogLevel.Trace, "(but they don't know that.)");
// 
Logging with an owner class
class CustomTestClass {}
log.Log<CustomTestClass>(LogLevel.Info, "this one comes from somewhere!");
// Info: CustomTestClass: this one comes from somewhere!
Logging with time

This is the default time format. Time logging defaults to off.

// this is the default time format. time logging defaults to off.
Logger log = new Logger(LogLevel.Info, true, "HH:mm:ss");
log.Log(LogLevel.Info, "yes, I did write this readme at 4 am");
// [04:12:02] Info: yes, I did write this readme at 4 am

On Windows (at least, that's the only tested environment) the Warn line here will be in yellow. Error and Fatal are in red, and Trace is in blue.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 109 9/1/2024