ChaseLabs.Logger 0.2.1.3

Suggested Alternatives

Serilog

Additional Details

This package is no longer being actively worked on.

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

// Install ChaseLabs.Logger as a Cake Tool
#tool nuget:?package=ChaseLabs.Logger&version=0.2.1.3                

CLLogger

An easy to use file logging system.

Create Logger

Default Values

  • Log files path defaults to "exe-directory/logs/latest.log"
  • Minimum log type defaults to "All Log Levels"
  • Default pattern is "[ %TYPE%: %DATE% ]: %MESSAGE%"
  • Default dump type is No Dump
  • Default dump interval is 10 seconds

Default Logger

ILog log = LogManager.Init();

Default Logger with modified path

// This file and directories will be created for you.
ILog log = LogManager.Init().SetLogDirectory("relative/or/absolute/path/to/");

Default Logger with modified minimum log type

Log Types
  • All
  • Debug
  • Info
  • Warn
  • Error
  • Fatal
// This will only show logs at and above info
// Ex: Info, Warn, Error, Fatal
ILog log = LogManager.Init().SetMinimumLogType(LogTypes.Info);

Default Logger with modified pattern

Pattern variables
  • %TYPE% = Log Type
  • %DATE% = Current Date and Time down to the millisecond
  • %MESSAGE% = The actual log message
// [DEBUG: 1/01/2000 5:00:00 PM]: Hello World
ILog log = LogManager.Init().SetPattern("[%TYPE%: %DATE%]: %MESSAGE%");

Default Logger with modified dump type

Dump Types
  • NoDump = Will never write log to file
  • NoBuffer = Will write to file as soon as it was written to console
  • Interval = Will dump all cached logs every x milliseconds
ILog log = LogManager.Init().SetDumpMethod(DumpType.NoBuffer);

If you want a interval of 5 seconds or 5000 milliseconds

ILog log = LogManager.Init().SetDumpMethod(DumpType.Interval, 5000);

You can also use just the interval and it will automatically be DumpType of Interval

ILog log = LogManager.Init().SetDumpMethod(5000);

Create Log

Send Info Log Message

log.Info("Hello World");

Send Multiple Messages

log.Info("Hello World", "Good Bye World");

Send Error Message with exception

try {
  /// Something that fails
} catch(Exception e) {
  log.Error("Hello World", e);
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.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
0.2.1.3 477 7/11/2022 0.2.1.3 is deprecated because it is no longer maintained.
0.2.1.1 438 2/13/2022
0.2.1 344 12/3/2021
0.2.0 1,658 11/28/2021
0.1.2 374 10/18/2021
0.1.1 339 9/8/2021
0.1.0 303 8/29/2021
0.0.9 325 8/26/2021
0.0.8 477 6/15/2020
0.0.7 521 4/5/2020
0.0.6 615 4/5/2020
0.0.5 613 4/4/2020

Fixed issue where if unable to rename file application crashes