You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace custom ILogger with Serilog + Microsoft.Extensions.Logging (#85)
* refactor: extract IProgressReporter from ILogger (#64)
Separate progress reporting (Progress, EndProgress, Finish) from logging
into a new IProgressReporter interface. This is the first step toward
replacing the custom ILogger with Microsoft.Extensions.Logging + Serilog.
- Add IProgressReporter interface and NullProgressReporter
- Remove Progress, EndProgress, Finish from ILogger and all implementations
- Remove dead BeginModule/EndModule from NullLogger
- Add ProgressReporter property to ConfuserParameters and ConfuserContext
- Replace PackerLogger (full ILogger decorator) with PackerProgressReporter
- Update all WithProgress call sites to use context.ProgressReporter
- Fix MSBuildLogger.Finish bug (was setting HasError=false on failure)
- Seal NullLogger class
* feature: add M.E.L abstraction and MelLoggerAdapter (#64)
Add Microsoft.Extensions.Logging.Abstractions to Confuser.Core
(netstandard2.0 compatible) and a MelLoggerAdapter that bridges
M.E.L ILogger to the internal Confuser.Core.ILogger interface.
This allows callers to pass a standard M.E.L logger (backed by
Serilog or any other provider) into ConfuserEngine without
changing any internal code yet.
* feature: replace CLI ConsoleLogger with Serilog (#64)
Wire up Serilog as the logging provider in the CLI via
Microsoft.Extensions.Logging and MelLoggerAdapter.
- Add Serilog, Serilog.Extensions.Logging, Serilog.Sinks.Console
- Delete custom ConsoleLogger — Serilog handles all console output
- Add --verbose (-v, -vv, -vvv) and --quiet (-q) CLI flags
- Default: Information level; -q: Warning; -v: Debug; -vv+: Verbose
* feature: replace GUI logger with Serilog FlowDocument sink (#64)
Wire up Serilog in the WPF GUI via a custom FlowDocumentSink that
renders color-coded log output to the protection log panel.
- Add Serilog and Serilog.Extensions.Logging to ConfuserEx
- Create FlowDocumentSink — custom Serilog sink for WPF Paragraph
- Remove ILogger from ProtectTabVM — now uses MelLoggerAdapter
- ProtectTabVM keeps only IProgressReporter (progress bar + finish)
- Delete ~40 lines of manual ILogger boilerplate
* chore: add local-ci.sh script mirroring GitHub Actions pipeline
Full local CI script that replicates lint.yml, ci.yml, and test.yml:
- lint: whitespace, style, and analyzer checks via dotnet format
- build: dotnet build for SDK projects + MSBuild.exe for C++/CLI
- test: discovers all *.Test.csproj, runs with coverage, summary
- package: creates CLI, GUI, and combined zip archives
Usage: ./scripts/local-ci.sh [lint|build|test|package|all]
* refactor: replace Confuser.Core.ILogger with Microsoft.Extensions.Logging.ILogger (#64)
Complete migration from the custom 13-method ILogger interface to the
standard M.E.L ILogger abstraction across all projects.
- Change ConfuserContext.Logger and ConfuserParameters.Logger to M.E.L ILogger
- Convert all ~80 call sites: Debug→LogDebug, Info→LogInformation,
Warn→LogWarning, Error→LogError, *Exception→swap parameter order
- Rewrite MSBuildLogger as MSBuildMelLogger implementing M.E.L ILogger
- Rewrite XUnitLogger implementing M.E.L ILogger + IProgressReporter
- Remove MelLoggerAdapter (no longer needed — M.E.L is the native type)
- Delete Confuser.Core.ILogger, NullLogger (replaced by M.E.L NullLogger)
- Add test-results/ and coverage/ to .gitignore
* chore: fix import ordering to pass CI lint (#64)
* fix: dispose GUI logger factory after async protection completes (#64)
DoProtect used 'using var loggerFactory' which disposed the factory
(and the Serilog logger via dispose:true) as soon as DoProtect returned.
Since ConfuserEngine.Run executes asynchronously on a background thread,
this disposed the logger before the protection actually used it, silently
dropping log output mid-run. Move disposal into the ContinueWith
continuation so the factory lives for the full protection lifetime.
* test: fix flaky GUI protect test — deterministic tab navigation (#64)
Gui_ProtectSampleApp_ShowsSuccess intermittently failed at the Protect!
button lookup (~1 in 3 runs). Two root causes:
1. ByText("Protect!") ambiguously matched both the tab header and the
Protect! button (they share the caption), so the wrong element could
be clicked and the tab never actually got selected.
2. WPF virtualizes inactive tab content — the Protect! button does not
enter the UIA tree until the tab is selected AND rendered. The 5s
button-find timeout was too short under load.
Fix: match the tab by TabItem control type + name, Select() it and wait
for IsSelected, then find the button with a 15s timeout. 5/5 consecutive
full-suite runs now pass 3/3 (previously ~1/3 failed).
---------
Co-authored-by: RandomCrocodile <mawi@polosab.com>
0 commit comments