![]() |
VOOZH | about |
dotnet add package SeliseBlocks.LMT.Client --version 10.0.1
NuGet\Install-Package SeliseBlocks.LMT.Client -Version 10.0.1
<PackageReference Include="SeliseBlocks.LMT.Client" Version="10.0.1" />
<PackageVersion Include="SeliseBlocks.LMT.Client" Version="10.0.1" />Directory.Packages.props
<PackageReference Include="SeliseBlocks.LMT.Client" />Project file
paket add SeliseBlocks.LMT.Client --version 10.0.1
#r "nuget: SeliseBlocks.LMT.Client, 10.0.1"
#:package SeliseBlocks.LMT.Client@10.0.1
#addin nuget:?package=SeliseBlocks.LMT.Client&version=10.0.1Install as a Cake Addin
#tool nuget:?package=SeliseBlocks.LMT.Client&version=10.0.1Install as a Cake Tool
A robust and high-performance .NET client library for logging and distributed tracing with Azure Service Bus integration. Designed for enterprise applications requiring centralized log and trace management with built-in resilience, batching, and automatic retry mechanisms.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Application β
β ββββββββββββββββ ββββββββββββββββββββββββ β
β β IBlocksLoggerβ β OpenTelemetry β β
β β (Logs) β β (Traces) β β
β ββββββββ¬ββββββββ ββββββββββββ¬ββββββββββββ β
β β β β
β β Batching & Retry β Batching & Retry β
β βΌ βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Azure Service Bus β β
β ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β LMT Service Worker β
β (Subscriptions) β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β MongoDB Storage β
β β’ Logs by Service β
β β’ Traces by Tenant β
βββββββββββββββββββββββββ
Install via NuGet Package Manager:
dotnet add package SeliseBlocks.LMT.Client
Or via Package Manager Console:
Install-Package SeliseBlocks.LMT.Client
appsettings.Development.json:{
"Lmt": {
"ServiceId": "your-service-id",
"ConnectionString": "Endpoint=sb://your-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key",
"XBlocksKey": "your-XBlocksKey",
"LogBatchSize": 100,
"TraceBatchSize": 1000,
"FlushIntervalSeconds": 5,
"MaxRetries": 3,
"MaxFailedBatches": 100,
"EnableLogging": true,
"EnableTracing": true
}
}
Program.cs or Startup.cs:
// Add LMT Client
builder.Services.AddLmtClient(builder.Configuration);
// Add OpenTelemetry for distributed tracing
builder.Services.AddSingleton(new ActivitySource("your-serviceId"));
builder.Services.AddOpenTelemetry()
.WithTracing(tracerBuilder =>
{
tracerBuilder
.AddSource("your-serviceId") // Match your ServiceId
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddLmtTracing(builder.Services.BuildServiceProvider()
.GetRequiredService<LmtOptions>());
});
public class Test
{
private readonly IBlocksLogger _logger;
private readonly ActivitySource _activitySource;
public Test(IBlocksLogger logger, ActivitySource activitySource)
{
_logger = logger;
_activitySource = activitySource;
}
public string LogTest()
{
using var activity = _activitySource.StartActivity("LogTest");
_logger.LogInformation("LogTest method call");
return "Test successful";
}
}
| Property | Type | Default | Description | |
|---|---|---|---|---|
ServiceId |
string |
required | Unique identifier for your service | |
ConnectionString |
string |
required | Azure Service Bus connection string | |
XBlocksKey |
string |
required | Selise blocks cloud key | |
LogBatchSize |
int |
100 |
Number of logs to batch before sending | |
TraceBatchSize |
int |
1000 |
Number of traces to batch before sending | |
FlushIntervalSeconds |
int |
5 |
Interval to flush batches automatically | |
MaxRetries |
int |
3 |
Maximum retry attempts for failed sends | |
MaxFailedBatches |
int |
100 |
Maximum failed batches to queue | |
EnableLogging |
bool |
true |
Enable/disable logging | |
EnableTracing |
bool |
true |
Enable/disable tracing |
// Trace - Most detailed information
_logger.LogTrace("Entering method ProcessPayment");
// Debug - Debugging information
_logger.LogDebug("Payment gateway response received");
// Information - General flow
_logger.LogInformation("Payment processed successfully {dateTime}", DateTimeOffset.UtcNow);
// Warning - Unexpected but handled situations
_logger.LogWarning("Payment took longer than expected");
// Error - Errors and exceptions
_logger.LogError("Payment failed", exception);
// Critical - Critical failures
_logger.LogCritical("Payment gateway is down", exception);
public interface IBlocksLogger
{
void Log(LmtLogLevel level, string message, Exception exception = null, params object?[] args);
void LogTrace(string message, params object?[] args );
void LogDebug(string message, params object?[] args);
void LogInformation(string message, params object?[] args);
void LogWarning(string message, params object?[] args);
void LogError(string messageTemplate, Exception? exception = null, params object?[] args);
void LogCritical(string message, Exception exception = null, params object?[] args);
}
public enum LmtLogLevel
{
Trace = 0, // Most detailed
Debug = 1, // Debug information
Information = 2, // General flow
Warning = 3, // Unexpected situations
Error = 4, // Errors and exceptions
Critical = 5 // Critical failures
}
This project is licensed under the MIT License - see the file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on SeliseBlocks.LMT.Client:
| Package | Downloads |
|---|---|
|
SeliseBlocks.Genesis
Blocks Genesis |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.1 | 3,838 | 5/11/2026 |
| 9.0.6 | 320 | 4/6/2026 |
| 9.0.5 | 169 | 4/6/2026 |
| 9.0.4 | 139 | 3/17/2026 |
| 9.0.3 | 10,987 | 10/27/2025 |
| 9.0.2 | 269 | 10/23/2025 |
| 9.0.1 | 287 | 10/15/2025 |
| 1.0.10 | 224 | 10/15/2025 |
| 1.0.9 | 208 | 10/15/2025 |
| 1.0.8 | 232 | 10/15/2025 |
| 1.0.7 | 221 | 10/14/2025 |
| 1.0.6 | 222 | 10/14/2025 |
| 1.0.5 | 220 | 10/14/2025 |
| 1.0.3 | 437 | 10/11/2025 |
| 1.0.2 | 186 | 10/11/2025 |
| 1.0.1 | 150 | 10/11/2025 |
| 1.0.0 | 233 | 10/9/2025 |