jwosty/FSharp.Logf
53.1
Adequate · 3 October 2026
911
lines of production code
F#
primary language
2
measurements over time
What this system is
This system is a logging library for F\# that provides a printf-style formatting interface compatible with both .NET and JavaScript (via Fable). It bridges F\# logging to the Microsoft.Extensions.Logging ecosystem through adapters for Expecto and Suave, while also offering a dedicated console logger for browser environments. The project includes performance benchmarks and a comprehensive test suite to ensure formatting parity across platforms.
Features
Added benchmark suite for FSharp.Logf performance
A new benchmark project has been added to measure the performance of the FSharp.Logf library against standard Microsoft.Extensions.Logging and Serilog. The suite uses BenchmarkDotNet to compare logging methods with zero, one, two, and ten parameters, including specific tests for the %A format specifier, running on .NET 9.
benchmark · high confidence
Introduce Fable-compatible logging with ConsoleLogger and .NET-style format translation
The \src/Fable.FSharp.Logf\ package now includes a \ConsoleLogger\ that outputs to the JavaScript console, allowing Fable applications to use \Microsoft.Extensions.Logging\ without pulling in \Fable.Core\ as a direct dependency. The \logf\ module translates F\# printf-style format specifiers (such as \%e\, \%E\, \%M\, \%B\, and \%x\) into .NET-style format strings, enabling structured logging with named parameters and supporting flags like zero-padding and left-justification.
src/Fable.FSharp.Logf · high confidence
Removals
Removal of FSharp.Logf source files
The source files for the FSharp.Logf module (logf.fs and logf.fsi) have been deleted from the repository. This removes the implementation of the F\# logging abstraction, including the Fable-specific console logging proxy and the .NET-specific Microsoft.Extensions.Logging integration, effectively eliminating this library component from the project.
src/FSharp.Logf · high confidence
Behavioural changes
Build script enforces dependency version consistency in NuGet packages
The build process now includes a post-processing step that modifies generated .nupkg and .snupkg files to ensure their internal dependency versions match the constraints defined in paket.dependencies. This prevents mismatches between the package manifest and the actual resolved dependencies, addressing a previous issue where DLL dependency versions did not align with the package manifest.
build · high confidence
ExpectoMsLoggerAdapter now supports generic ILogger interfaces
The ExpectoMsLoggerAdapter in the FSharp.Logf.ExpectoAdapter library has been updated to implement the generic Microsoft.Extensions.Logging.ILogger\<TCategoryName\> interface instead of the non-generic ILogger. This change allows the adapter to provide category-aware logging capabilities when bridging Expecto loggers to the Microsoft.Extensions.Logging ecosystem, and the extension method AsMsLogger now exposes overloads for both generic and non-generic ILogger types.
src/FSharp.Logf.ExpectoAdapter · high confidence
Improved error handling and explicit type references in Suave logger adapter
The Suave logger adapter now provides better feedback when encountering unimplemented log message types by logging a warning with a link to the project's issue tracker instead of silently failing or raising exceptions in release builds. Additionally, the code has been refactored to use fully qualified type names (e.g., \Microsoft.Extensions.Logging.LogLevel\, \Suave.Logging.Logger\) and the namespace has been updated from \Q2Q.Core.UIServer.Logging\ to \FSharp.Logf.Suave\, improving clarity and reducing ambiguity in the adapter's interface.
src/FSharp.Logf.SuaveAdapter · high confidence
Test coverage
Add Fable-compatible test suite for log formatting
Added a new test project under \tests/FSharp.Logf.Tests/Fable\ that enables running the \logf\ formatting tests in a JavaScript environment via Fable and Mocha. This includes a custom \AssertableLogger\ proxy to capture log output, helper modules to bridge Expecto assertions to Mocha, and a webpack configuration to bundle the tests. The test suite covers string interpolation, format specifiers (such as \%e\, \%E\, \%M\, \%B\, \%x\), alignment flags, and corner cases like negative zeros, ensuring parity with the native .NET Expecto tests.
tests · high confidence
Dependencies
Upgrade .NET SDK to version 9.0
The project's global configuration has been updated to target .NET SDK version 9.0.100, changing the roll-forward policy from \latestMinor\ to \latestFeature\. This ensures the build environment uses the latest compatible features within the 9.0 release line.
(repo-wide) · high confidence
Upgrade to .NET 9 and introduce Fable support
The project has upgraded its build and test infrastructure to target .NET 9, replacing the previous .NET 7 target. This change includes the introduction of a new \Fable.FSharp.Logf\ package to provide ConsoleLogger support for Fable (F\# to JavaScript compilation), alongside a new benchmark project. The dependency graph has been updated to include \BenchmarkDotNet\, \Fable.Core\, \Fable.Mocha\, and \Serilog\ sinks, while the main library now shares source files with the Fable variant via conditional compilation constants.
(dependencies) · high confidence
Housekeeping
BenchmarkDotNet artifacts generated for logging performance
BenchmarkDotNet reports (Markdown, CSV, and HTML) have been added to the artifacts directory, detailing performance comparisons between standard logging methods and a custom 'Logf' implementation across NullLogger and SerilogFileLogger providers on .NET 7.0.
BenchmarkDotNet.Artifacts · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 52 → 53 (+0.8)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 43 → 43 (+0.0)
- Readiness 63 → 63 (+0.0)
- Security 55 → 58 (+2.6)
- Accessibility 57 → 57 (+0.0)
- Performance 85 (new)
Resolved (3)
- Documentation: no installation or build instructions (README.md)
- Documentation: no installation or build instructions (packages/test/Fable.Core/README.md)
- Documentation: no installation or build instructions (packages/test/Newtonsoft.Json/README.md)
New (6)
- Documentation: no architecture or design documentation (docs/Index.md)
- Documentation: no contributor guidance (Readme.md)
- Documentation: no installation or build instructions (Readme.md)
- Documentation: no licence statement (Readme.md)
- Documentation: no usage examples (Readme.md)
- High CVE: [GHSA redacted] (yarn.lock)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jwosty/FSharp.Logf was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 99270849b041ecf5b83f2ddafe07954b02066e45 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.