Jeylabs.Logger 1.0.0

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

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

alternate text is missing from this package README image Jeylabs.Logger (.Net Framework)

The package to Log any exceptions, Information or any messages on a log file. it creates a log file inside the Application path and keeps logging on file with the date and tine name prefix.

Target

The package targets .Net Framework 4.0 or latest. you can install and use the package Jeylabs.Logger on projects which are based on .Net Framework

Usage

To start using reusable_timeline you can install it using nuget

  • If you are using "Nuget Package Manager Console" use the following command to install it

      Install-Package Jeylabs.Logger -Version 1.0.0
    
  • If you are using ".NET CLI" use the following command to install it

      dotnet add package Jeylabs.Logger --version 1.0.0
    
  • If you are using "Nuget Package Manager (GUI)" follow the steps which following gif showing.

alternate text is missing from this package README image

You must use the Jeylabs.Logger namespace from the JJeylabs.Logger package

using Jeylabs.Logger;

Your Can refer the following Example:

.

using System;
using Jeylabs.Logger;

namespace LoggerPackageDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //OPTION #1
                //Example for Log a message or Information
                string message = "The Logger package demo is started";

                LoggerService.Instance.WriteLog(message);  // Log the costom message by passing a string value as parameter.


                // Generating New Exceptions
                Exception innerException = new InvalidOperationException("Invalid Operation!!"); // Inner exception
                Exception generalException = new InvalidCastException("Invalid cast operation", innerException);// Parent Exception
                throw generalException;// Throw the exception
            }
            catch (Exception ex)
            {
                // OPTION #2
                LoggerService.Instance.WriteLog(ex); // Log the exception by passing an exception as parameter.
            }
            finally
            {
                //Example for Log a message or Information
                string message = "The Logger package demo is closed";

                LoggerService.Instance.WriteLog(message);  // Log the costom message by passing a string value as parameter.
            }

        }
    }
}



Demo

alternate text is missing from this package README image

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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.0.0 494 10/30/2019

Initial Release.