Adeel.NugetDemo.applogger 2.0.0

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

// Install Adeel.NugetDemo.applogger as a Cake Tool
#tool nuget:?package=Adeel.NugetDemo.applogger&version=2.0.0                

Table of Contents Overview Features Installation Usage Configuration API Documentation Troubleshooting Contributing Contact Overview

AppLogger is a simple and flexible logging library for .NET applications. It provides a lightweight and configurable API for logging events and exceptions to multiple destinations, including the console, files, and databases. Features

Multi-destination logging: Log to multiple destinations, including the console, files, and databases. Flexible logging levels: Log events and exceptions at different levels, including debug, info, warn, error, and fatal. Async logging: Log events and exceptions asynchronously to avoid blocking the calling thread. Configurable: Configure logging settings, including log levels, destinations, and file paths. Installation

To install AppLogger, run the following command in the NuGet Package Manager Console: Bash Install-Package Adeel.NugetDemo.applogger Usage

To use AppLogger, create an instance of the Logger class and call the LogAsync method: C# using Adeel.NugetDemo.applogger;

// Create a logger instance Logger logger = new Logger();

// Log an event await logger.LogAsync(LogLevel.Info, "Application started."); Configuration

To configure AppLogger, create an instance of the LoggingSettings class and pass it to the Logger constructor: C# using Adeel.NugetDemo.applogger;

// Create logging settings LoggingSettings settings = new LoggingSettings { LogToConsole = true, LogToFile = true, LogFilePath = "log.txt" };

// Create a logger instance Logger logger = new Logger(settings); API Documentation

Logger Class LogAsync(LogLevel level, string text, Exception exception = null): Logs an event or exception asynchronously. LoggingSettings Class LogToConsole: Gets or sets a value indicating whether to log to the console. LogToFile: Gets or sets a value indicating whether to log to a file. LogFilePath: Gets or sets the file path to log to. Troubleshooting

Make sure to configure the logging settings correctly. Check the log file path and ensure that it is correct. Verify that the logging level is set correctly. Contributing

Contributions are welcome! If you'd like to contribute to AppLogger, please fork the repository and submit a pull request. Contact

For any questions or issues, please contact Adeel Here is my LinkedIn profile:https://www.linkedin.com/in/adeelsattarwordpressdevdigitalmarketer."

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.0.0 91 12/5/2024
1.0.0 87 12/3/2024