Chd.Library.Logging 1.3.6

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

// Install Chd.Library.Logging as a Cake Tool
#tool nuget:?package=Chd.Library.Logging&version=1.3.6                

Logging library for .Net Core

📝 Table of Contents

🧐 About <a name = "about"></a>

I'm computer engineer for 13 years. I wrote this package for logging asp.net core applications. This logging machenism is use aspects for sipmlfy code.

🏁 Getting Started <a name = "getting_started"></a>

Logging is an important feature that finding the cause of problem. This package is very simple to use with aspect oriented programming. This library is sink graylog server. You can see logs on graylog run simple step below.

Prerequisites

You must use .net core 6.0 or higher

  • Install graylog server.

Installing

  • dotnet add package Chd.Library.Logging --version 1.4.2

🔧 Running the tests <a name = "tests"></a>

    [TestClass]
    public class CachingTests
    {
        static CachingTests()
        {
            LoggingDependencyInjectionExtensions.UseLogger(null);
        }
        [TestMethod]
        public void Test()
        {
            int a = 4;
            Sum(2, 0);
        }
        [Logged]
        public int Sum(int a, int b)
        {
            //Logger.LogError("hata"); manuel logging.     
            return a + b;
        }
    }

You must add below code in appsettings.json

  "LogConfig": {
    "Server": "192.168.x.x", //required ip for graylog server
    "Port": "xxxx", //graylog server port
    "Path": "C:\\Logs\\LibrarySampleApp1\\log.txt",
    "PathFormat": "C:\\Logs\\LibrarySampleApp1\\log-{Date}.txt",
    "ApplicationName": "Library"
  },

Test Result

Add break point in to Sum method. You will see only one times broke down into method. Other call is brought from redis server.

🎈 Usage <a name="usage"></a>

Firtly you must call UseLogger method ("app.UseLogger();") in the program.cs file. You must use Logged attribute on method whice you want to cache return value of method.

⛏️ Built Using <a name = "built_using"></a>

✍️ Authors <a name = "authors"></a>

See also the list of contributors who participated in this project.

🎉 Acknowledgements <a name = "acknowledgement"></a>

Thank you for using my library.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Chd.Library.Logging:

Package Downloads
Chd.Library.Core

The library written for .net core framework

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.1 502 2/3/2024
8.0.0 379 1/30/2024
7.4.1 1,022 8/25/2023
7.4.0 584 8/18/2023
7.3.8 671 8/9/2023
1.3.8 466 6/15/2023
1.3.7 531 6/13/2023
1.3.6 505 6/13/2023
1.3.4 462 6/13/2023
1.3.3 689 5/28/2023
1.3.2 693 5/8/2023
1.3.1 452 5/8/2023
1.3.0 699 4/28/2023
1.2.9 460 4/28/2023
1.2.8 1,139 2/9/2023
1.2.7 2,274 1/30/2023
1.1.9 3,011 1/30/2023