UtilityPack.Logger 1.1.3

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

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

Logger


Logger mette a disposizione una singola classe statica, con al suo interno diversi metodi a loro volta statici che si occupano di eseguire rapide scritture di file su disco in luoghi predefiniti.

Enumeratori

LogLocation
Definizioni per i luoghi dove impostare la cartella madre per i log.

public enum LogLocation
{   
        ROOT,
        CUSTOM,
        EXEPOS,
        PROGDATA,
        APPDATAROAM,
        APPDATALOCA
}
  • ROOT = C:\
  • CUSTOM = cartella libera
  • EXEPOS = stessa cartella in cui si trova l'eseguibile
  • PROGDATA = C:\ProgramData\
  • APPDATAROAM = ..\AppData\Roaming
  • APPDATALOCA = ..\AppData\Local

Proprietà di Logger

IsLogActive : bool
Valore booleano, solo se impostato a 'true' i metodi di Logger salveranno effettivamente i file su disco.

LogDirSub : string
Stringa per definire sottocartelle su cui scrivere i file, la sottocartella è posizionata dentro la cartella principale, definita dal metodo SetLogLocation().

Metodi di Logger

SetLogLocation
Usata per definire il luogo dove è posizionata la cartella madre di logging, richiede un valore dell'enumeratore LogLocation.
Il parametro 'customDir' è necessario unicamente se si sceglie il valore 'LogLocation.CUSTOM'.

	SetLogLocation(LogLocation location, string customDir = "")

LogText
Scrive su disco un testo, come argomenti richiede il testo da scrivere e l'eventuale nome aggiuntivo del file.
Formato del file .txt

	LogText(string text, string name = "")

LogJson
Scrive su disco un oggetto json, come argomenti richiede un oggetto serializzabile come json e l'eventuale nome aggiuntivo del file.
Formato del file .json

	LogJson(object obj, string name = "")

LogJson
Scrive su disco un oggetto json, come argomenti richiede un testo in formato json e l'eventuale nome aggiuntivo del file.
Formato del file .json

	LogJson(string text, string name = "")

LogJsonList
Scrive su disco una lista di oggetti json, come argomenti richiede una lista di oggetti serializzabili come json e l'eventuale nome aggiuntivo del file.
Formato del file .json

	LogJsonList<T>(List<T> list, string name = "")
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 is compatible.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.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.1.8 464 6/30/2022
1.1.7 421 5/31/2022
1.1.6 421 5/16/2022
1.1.5 420 5/16/2022
1.1.4 430 5/16/2022
1.1.3 428 3/29/2022
1.1.2 443 2/17/2022
1.1.1 436 2/17/2022
1.1.0 442 2/4/2022
1.0.3 438 2/4/2022
1.0.2.2 437 2/4/2022
1.0.2.1 423 2/4/2022
1.0.2 267 12/30/2021
1.0.1 270 12/29/2021
1.0.0 297 11/17/2021