EggEgg.CSharp-Logger 2.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package EggEgg.CSharp-Logger --version 2.1.2                
NuGet\Install-Package EggEgg.CSharp-Logger -Version 2.1.2                
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="EggEgg.CSharp-Logger" Version="2.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EggEgg.CSharp-Logger --version 2.1.2                
#r "nuget: EggEgg.CSharp-Logger, 2.1.2"                
#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 EggEgg.CSharp-Logger as a Cake Addin
#addin nuget:?package=EggEgg.CSharp-Logger&version=2.1.2

// Install EggEgg.CSharp-Logger as a Cake Tool
#tool nuget:?package=EggEgg.CSharp-Logger&version=2.1.2                

csharp-logger

A bussy but convenient C# Logger implement.
You can download it on nuget.org by searching EggEgg.CSharp-Logger.

NuGet

Update

v2.1.2

Bugfix about ConsoleWrapper initialize.

v2.1.1

You can now set LoggerConfig(use_Working_Directory) to specify whether the log files will be storaged at the working directory or the program path. For more information, see the description of this variable.

Notice that the previous versions use the working directory.

Features

  • Common logger implements
    Usage: Firstly Log.Initialize(LoggerConfig), then Log.Info(content, sender), Log.Erro(...), Log.Warn(...), Log.Dbug(...).
  • Color output Support
    Just add xml tags in text, like:<color=Red>Output as red color</color>.
    The Color value should be a valid value in ConsoleColor, e.g. "Red", "Green".
    Recognized color tags will be removed in the log file.
  • Command Line Support
    if you wants to read the user's input while outputing logs parallel (e.g. making a command line program), ConsoleWrapper is provided.
    You can set the value of ConsoleWrapper.InputPrefix as a waiting-input prefix, just like mysql> or ubuntu ~$ , and use ConsoleWrapper.ReadLineAsync to read inputs from the user.
    _Notice that it will impact the performance when the user's input is very large. It's disabled as default, and you can enable it by LoggerConfig(use_Console_Wrapper: true).
  • Output amount limit
    Large infomation outputing can severely impact the performance. You can set the maximum output amount per line by LoggerConfig.Max_Output_Char_Count.
    You can also disable this by setting it to -1.
  • Auto compress logs
    If there're logs created 1 day ago, they will be compressed into a zip file like logs.[Date].zip.
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
5.0.0 265 7/16/2024
4.0.2 351 12/22/2023
4.0.1 370 11/6/2023
4.0.0 358 9/23/2023
3.0.0 343 7/13/2023
2.2.3 316 6/9/2023
2.2.2 203 5/31/2023
2.2.1 217 5/6/2023
2.1.4 267 4/15/2023
2.1.3 228 4/15/2023
2.1.2 223 4/9/2023
2.1.1 226 4/9/2023
2.1.0 238 4/8/2023 2.1.0 is deprecated because it has critical bugs.
2.0.1 224 4/8/2023
2.0.0 276 4/8/2023

Changes in v2.0.0:
- Published as a nuget package
- Supported output with colors
- Supported custom config
- Bugfixs