Chd.Library.Logging 8.0.1

dotnet add package Chd.Library.Logging --version 8.0.1
NuGet\Install-Package Chd.Library.Logging -Version 8.0.1
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="8.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chd.Library.Logging --version 8.0.1
#r "nuget: Chd.Library.Logging, 8.0.1"
#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=8.0.1

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

Logging library for .Net Core

📝 Table of Contents

🧐 About

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

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.

🔧 Running the tests

    [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

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

✍️ Authors

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

🎉 Acknowledgements

Thank you for using my library.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 419 2/3/2024
8.0.0 335 1/30/2024
7.4.1 976 8/25/2023
7.4.0 555 8/18/2023
7.3.8 633 8/9/2023
1.3.8 441 6/15/2023
1.3.7 500 6/13/2023
1.3.6 482 6/13/2023
1.3.4 439 6/13/2023
1.3.3 658 5/28/2023
1.3.2 661 5/8/2023
1.3.1 431 5/8/2023
1.3.0 668 4/28/2023
1.2.9 436 4/28/2023
1.2.8 1,097 2/9/2023
1.2.7 2,172 1/30/2023
1.1.9 2,948 1/30/2023