UtilityPack.Logger 1.0.3

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

// Install UtilityPack.Logger as a Cake Tool
#tool nuget:?package=UtilityPack.Logger&version=1.0.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 425 6/30/2022
1.1.7 394 5/31/2022
1.1.6 389 5/16/2022
1.1.5 387 5/16/2022
1.1.4 399 5/16/2022
1.1.3 397 3/29/2022
1.1.2 409 2/17/2022
1.1.1 400 2/17/2022
1.1.0 418 2/4/2022
1.0.3 403 2/4/2022
1.0.2.2 406 2/4/2022
1.0.2.1 396 2/4/2022
1.0.2 236 12/30/2021
1.0.1 240 12/29/2021
1.0.0 264 11/17/2021