RSDistributedLoggingLibrary 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package RSDistributedLoggingLibrary --version 1.0.2
                    
NuGet\Install-Package RSDistributedLoggingLibrary -Version 1.0.2
                    
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="RSDistributedLoggingLibrary" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RSDistributedLoggingLibrary" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="RSDistributedLoggingLibrary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RSDistributedLoggingLibrary --version 1.0.2
                    
#r "nuget: RSDistributedLoggingLibrary, 1.0.2"
                    
#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.
#:package RSDistributedLoggingLibrary@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RSDistributedLoggingLibrary&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=RSDistributedLoggingLibrary&version=1.0.2
                    
Install as a Cake Tool

通过消息队列rabbitmq采集日志

功能介绍

这个 NuGet 包提供以下功能:

  • 一个分布式日志采集库,集成postsharp,需要同时安装postsharp
  • 已集成ELK
  • 通过rabbitmq发送消息进日志
  • 异常分类为BusinessException,DatabaseException,ExternalServiceException,NetworkException等

当前版本

版本:1.0.1


快速开始

            var configuration = new ConfigurationBuilder()
            .SetBasePath(Path.GetDirectoryName(Application.ExecutablePath))
            .AddJsonFile("appclientinfo.json", optional: false, reloadOnChange: true)
            .Build();

            var logConfig = configuration.GetSection("LogSettings").Get<LogConfiguration>();
            LogStaticHelper.Initialize(logConfig);

            LogStaticHelper.LogError(new BusinessException("hello"));
             LogStaticHelper.logInfo(new BusinessException("hello"));

配置文件示例

{
  "LogSettings": {
    "LogLevel": "Info",
    "LogOutput": "FileAndQueue", // 可选值:File 或 RabbitMQ或 FileAndQueue
    "FilePath": "logs", // 文件日志目录名
    "RabbitMQ": {
      "Host": "127.0.0.1",
      "Port": 5672,
      "Username": "*",
      "Password": "**",
      "QueueName": "rslog_queue",
      "Exchange": "rslog_exchange",
      "RoutingKey": "log_key",
      "VirtualHost": "rslog"
    }
  }
}

如需更多信息或反馈,请联系我。

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
1.0.4 151 6/25/2025
1.0.3 140 11/22/2024
1.0.2 109 11/22/2024
1.0.1 106 11/22/2024
1.0.0 123 11/9/2024