nk.logger.csv 3.0.1

Additional Details

This package is no longer maintained.

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

// Install nk.logger.csv as a Cake Tool
#tool nuget:?package=nk.logger.csv&version=3.0.1                

Simple CSV Logger

Targets .Net standard 2.0 GitHub GitHub Workflow Status GitHub Workflow Status

This is a simple logger for logging errors in a c# application. But instead of writing the logs to a txt file this logger writes them into a CSV file.

Downloads: Nuget

Usage

  1. Install the nuget package.
  2. Create an instance for nk.logger.csv.Logger in your base class.
  3. Edit the configuration according to your application needs.
  4. Create wrapper functions for the functions you need from csv.logger.
  5. Inherit this base class in your other classes.
Example

Below is a sample base class with configurations,

using System;

namespace Core.Lib
{
    public class Logger
    {
        private nk.logger.csv.Logger csvLogger;

        public Logger(string dateFormat, string fileName, string relativePath = "", char replacementValue = ';')
        {
            var config = new nk.logger.csv.LoggerConfig();
            
            // adding configuration
            config.SetDateTimeFormat(dateFormat)
                .SetFileName(fileName)
                .SetRelativePath(relativePath)
                .SetReplacementValue(replacementValue);
            
            csvLogger = new nk.logger.csv.Logger(config);
        }

        #region [Public Logger functions]

        public void Error(Exception ex) => csvLogger.Error(ex);

        public void Fatal(Exception ex) => csvLogger.Fatal(ex);

        public void Debug(string text) => csvLogger.Debug(text);

        public void Error(string text) => csvLogger.Error(text);

        public void Fatal(string text) => csvLogger.Fatal(text);

        #endregion [Public Logger functions]
    }
}
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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.1

    • 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.

### Changed
- Updating website details
- Updated dependencies
- Updating CI/CD to use .NET 5 SDK
- Updated tests project to .NET 5
- API for manually testing the logger is replaced with a console app