FastFsm.Net.Logging
0.9.0
See the version list below for details.
dotnet add package FastFsm.Net.Logging --version 0.9.0
NuGet\Install-Package FastFsm.Net.Logging -Version 0.9.0
<PackageReference Include="FastFsm.Net.Logging" Version="0.9.0" />
<PackageVersion Include="FastFsm.Net.Logging" Version="0.9.0" />
<PackageReference Include="FastFsm.Net.Logging" />
paket add FastFsm.Net.Logging --version 0.9.0
#r "nuget: FastFsm.Net.Logging, 0.9.0"
#:package FastFsm.Net.Logging@0.9.0
#addin nuget:?package=FastFsm.Net.Logging&version=0.9.0
#tool nuget:?package=FastFsm.Net.Logging&version=0.9.0
Logging
Install the logging package:
dotnet add package FastFsm.Net.Logging
The package sets FsmGenerateLogging=true and defines FSM_LOGGING_ENABLED. Generated machines then include the logging-specific constructor parameter and lifecycle logging code.
Project-reference configuration
When using project references inside this repository, enable logging generation with:
<PropertyGroup>
<FsmGenerateLogging>true</FsmGenerateLogging>
</PropertyGroup>
The FastFsm.Net.Logging package props set this property for package consumers.
Constructor injection
var logger = loggerFactory.CreateLogger<DoorController>();
var door = new DoorController(DoorState.Closed, logger: logger);
door.Start();
door.Fire(DoorTrigger.Open);
Event categories
Generated logging includes events for:
- machine start and stop
- transition start, success, and failure
- guard evaluation
OnEntry,OnExit, and action execution- unhandled triggers
- hierarchy-specific processing when HSM support is enabled
Event IDs and templates are defined by the logging source generator in Generator.Logger.
Extensions and logging
When FSM_LOGGING_ENABLED is active, exceptions caught while invoking extension hooks can be reported through the generated logging path. Extension behavior is defined by IStateMachineExtension implementations.
Tests
FastFsm.Logging.Tests contains logging integration tests and the Attribute/Fluent parity matrix (DualApiMatrixTests).
Related
- extensions.md — extension hooks
- getting-started.md — package installation
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- FastFsm.Net (>= 0.9.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
.NET 10 logging package for FastFsm.Net. Depends on FastFsm.Net. See CHANGELOG.md.