QFace.Sdk.Logging
1.0.6
dotnet add package QFace.Sdk.Logging --version 1.0.6
NuGet\Install-Package QFace.Sdk.Logging -Version 1.0.6
<PackageReference Include="QFace.Sdk.Logging" Version="1.0.6" />
<PackageVersion Include="QFace.Sdk.Logging" Version="1.0.6" />
<PackageReference Include="QFace.Sdk.Logging" />
paket add QFace.Sdk.Logging --version 1.0.6
#r "nuget: QFace.Sdk.Logging, 1.0.6"
#:package QFace.Sdk.Logging@1.0.6
#addin nuget:?package=QFace.Sdk.Logging&version=1.0.6
#tool nuget:?package=QFace.Sdk.Logging&version=1.0.6
QFace SDK
A collection of .NET libraries designed to simplify complex development tasks and provide robust, scalable solutions for modern applications.
Libraries
| Library | Description | NuGet |
|---|---|---|
| QFace.Sdk.ActorSystems | Lightweight wrapper around Akka.NET for actor-based systems | |
| QFace.Sdk.AI | Provider-agnostic LLM + forecasting SDK | |
| QFace.Sdk.BlobStorage | Blob/object storage helpers | |
| QFace.Sdk.ElasticSearch | Elasticsearch client helpers | |
| QFace.Sdk.Extensions | Common extension methods | |
| QFace.Sdk.Kafka | Kafka producer helpers (consumers removed; see docs/consumer-pipeline-removal.md) | |
| QFace.Sdk.Logging | Structured logging helpers | |
| QFace.Sdk.MongoDb | MongoDB data access (+ QFace.Sdk.MongoDb.MultiTenant) |
|
| QFace.Sdk.RedisCache | Redis caching helpers — see docs | |
| QFace.Sdk.RedisMq | Redis pub/sub publisher (consumers removed; see docs/consumer-pipeline-removal.md) | |
| QFace.Sdk.SendMessage | Send-message abstractions | |
| QFace.Sdk.Temporal | Temporal helpers (see QimErp.Shared.Common usage) |
|
| QFace.WebApi.Template | Project template for new WebApi SDK consumers | |
| QFace.Sdk.Messaging | Unified API for message queues / event brokers | Coming soon |
| QFace.Sdk.DataAccess | Flexible data access layer supporting multiple databases | Coming soon |
QimErp.Shared.CommonandQimErp.Shared.DemoDataalso build out of this repo'ssrc/, but they are QimERP platform libraries, not QFace SDK — see the platform docs (../docs/shared/MODULES.md).
Quick Start
Actor System SDK
dotnet add package QFace.Sdk.ActorSystems
// Register actor system
builder.Services.AddActorSystem(
new[] { typeof(Program).Assembly },
config =>
{
config.SystemName = "MySystem";
config.AddActorType<MyActor>();
},
addLifecycle: true);
// Use in your service
public class MyService
{
private readonly IActorService _actorService;
public MyService(IActorService actorService)
{
_actorService = actorService;
}
public void DoSomething()
{
_actorService.Tell<MyActor>(new MyMessage());
}
}
Documentation
For detailed documentation, visit:
Workflow approval gating: rollout prerequisite (Platform first)
QimErp.Shared.Common refuses a save of a workflow-enabled entity with
WorkflowApprovalStateUnavailableException (HTTP 503) unless it can prove whether approval is
needed. A missing workflow configuration or definition key proves "nothing bound" only when the
tenant warm marker (qface:qimerp:workflow:warm:{tenantId}) is a version 2 marker
({ "warmedAt": ..., "version": 2, "bound": ["{module}:{entityType}", ...] }), younger than
Workflow:WarmMarkerMaxAge (an hh:mm:ss duration, at most and by default 48h), not dated more
than 5 minutes in the future, and no bound entry names the entity type. An entry matches when it
equals the entity type or ends with :{entityType}, case-insensitive; the module part is ignored
because Platform's can be a template category (for example Leave) that differs from the service's
Workflow:Module (HR).
Platform must ship these, in this order, before any service bumps the package:
- Write workflow configuration and definition keys without a TTL.
- Re-warm them daily.
- After every successful full warm, write the version 2 warm marker with a 48h TTL.
- Rewrite the configuration whenever a definition is published.
- When a binding is deleted, write a disabled configuration instead of removing the key.
- Rewrite the marker, with the full
boundset, after every configuration or definition write, including when a binding is created or enabled, not only on the daily warm.
Until the version 2 marker is written, saves of workflow-enabled entities with nothing bound return 503.
Finance must also change before it adopts this version. It creates BillApproval
(ApBillApproval), PurchaseOrderApproval (ApPurchaseOrderApproval), InvoiceApproval
(ArInvoiceApproval), CreditNoteApproval (ArCreditNoteApproval) and
FixedAssetDocumentApproval (Fa*Approval) with preset workflow codes that Platform does not
publish, and its module keys (AP/AR/GL) differ from Platform's bindings. Before bumping,
Finance must either stop presetting those codes or have Platform publish them, and align its
module keys with Platform's.
A 503 (WorkflowApprovalStateUnavailableException, with Retry-After) means the approval state
could not be read and the request can be retried. A 409 (WorkflowPresetCodeMismatchException)
is permanent: the record was submitted with a WorkflowCode other than its configured create
workflow, so it must be fixed by the caller, not retried. Refusals are counted on the
QimErp.Shared.Common.Workflow meter: workflow.approval_gate.state_unreadable for the 503 cases
and workflow.approval_gate.preset_code_mismatch for the 409.
Consumers: test suites
There is no runtime switch to turn the marker rule off. Test projects use the
QimErp.Shared.Common.Testing package, which fails the build (QIMTEST001) in any project
without <IsTestProject>true</IsTestProject>. The guard slows accidental misuse; it is not a
security control, since a project can set the property or call the same cache APIs itself.
scripts/check-testing-package-guard.sh (run by PR validation) packs the package and proves the
guard ships and fires.
The Testing package always ships with Shared.Common's version and depends on exactly that version.
Both read QimErpSharedCommonVersion from src/QimErp.Shared.Common/SharedCommonVersion.props;
bump it there for a release.
Suites with an in-memory shared cache: seed a version 2 marker.
await WorkflowCacheTestSupport.SeedTenantWarmMarkerAsync(sharedCache, tenantId, boundPairs: []);Suites with a no-op cache or
RedisCache:Enabled=false(writes are dropped): wrap the registeredIWorkflowConfigCacheServiceso the test tenants report a warm cache.services.AddWarmWorkflowTenants(tenantId);WarmTenantsWorkflowConfigCacheis the decorator behind it, for suites that build the config cache by hand.
Samples
Check out the samples directory for complete working examples of each SDK.
Requirements
- .NET 6.0 or later
- For Actor System SDK: Akka.NET 1.4.46 or later
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
| Product | Versions 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. 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. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 7.0.3)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Hosting (>= 7.0.1)
- Serilog (>= 2.12.0)
- Serilog.Extensions.Hosting (>= 5.0.1)
- Serilog.Sinks.Console (>= 4.1.0)
- Serilog.Sinks.Graylog (>= 2.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on QFace.Sdk.Logging:
| Package | Downloads |
|---|---|
|
QimErp.Shared.Common
Shared common library for QimErp microservices ERP system. Contains common entities, contracts, services, and utilities used across all QimErp modules. |
GitHub repositories
This package is not used by any popular GitHub repositories.