Shared logging infrastructure for all ThreeByte.LinkLib packages — consistent, standardized console logging via Microsoft.Extensions.Logging.
| Feature | Description |
|---|---|
| 🧩 Shared Foundation | Common utilities used by all LinkLib packages |
| 📋 Structured Logging | Built on Microsoft.Extensions.Logging for standardized output |
| 🖥️ Console Output | Pre-configured console logging provider |
| 🏭 Logger Factory | Simple LogFactory.Create<T>() API for creating typed loggers |
dotnet add package ThreeByte.LinkLib.Shared
Note: This package is automatically included as a dependency when you install any other ThreeByte.LinkLib package (TcpLink, UdpLink, SerialLink, ProjectorLink, or NetBooter).
using ThreeByte.LinkLib.Shared;
// Create a typed logger for your class
ILogger logger = LogFactory.Create<MyService>();
logger.LogInformation("Service started on port {Port}", 8080);
logger.LogWarning("Connection attempt timed out");
logger.LogError("Failed to send data: {Error}", ex.Message);A static factory that creates pre-configured ILogger instances with console output.
| Method | Returns | Description |
|---|---|---|
Create<T>() |
ILogger |
Creates a console logger with the category name of type T |
info: MyApp.DeviceController[0]
Connected to projector at 192.168.1.200
warn: MyApp.DeviceController[0]
Reconnection attempt #3
┌──────────────────────────────────────────────────┐
│ Your Application │
└────────┬──────────┬──────────┬──────────┬────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────┐ ┌────────┐ ┌────────┐ ┌─────────┐
│ TcpLink │ │UdpLink │ │Serial │ │Projector│
│ │ │ │ │ Link │ │ Link │
└────┬────┘ └───┬────┘ └───┬────┘ └────┬────┘
│ │ │ │
└──────────┴──────┬───┴───────────┘
│
▼
┌─────────────────────────┐
│ ThreeByte.LinkLib │
│ .Shared │
│ │
│ LogFactory.Create<T>()│
│ │ │
│ ▼ │
│ Microsoft.Extensions │
│ .Logging.Console │
└─────────────────────────┘
| Package | Version | Purpose |
|---|---|---|
Microsoft.Extensions.Logging |
9.0.2 | Core logging abstractions |
Microsoft.Extensions.Logging.Abstractions |
9.0.2 | ILogger interface |
Microsoft.Extensions.Logging.Console |
9.0.2 | Console output provider |
| Platform | Supported |
|---|---|
| .NET 10.0 | ✅ |
| .NET Standard 2.1 | ✅ |
| .NET Standard 2.0 | ✅ |
| Windows | ✅ |
| Linux | ✅ |
| macOS | ✅ |
Part of the ThreeByte.LinkLib family of communication libraries.