feat(logging): build-config debug logging + task traceability #8
Reference in New Issue
Block a user
Delete Branch "feature/debug-logging-traceability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Build-configuration-driven logging so debugging is rich locally while the installed app stays quiet.
ClaudeDo.Logginglibrary:BuildConfig.IsDebug(runtimeDebuggableAttributecheck, no#if DEBUG),DefaultTaskIdEnricher, andLoggingSetup.Configure(the single shared Serilog setup both processes call).Debuglevel, console + file. Release builds (installed app):Warninglevel, file only.~/.todo-app/logs/claudedo-.log(retain 2), each line tagged with aProcessandSourceContext. The App/Ui were previously log-silent.TaskIdcorrelation rides SerilogLogContext: pushed inTaskRunner.RunAsync/ContinueAsync(Worker) and inWorkerClient.InvokeForTaskAsync(UI). Grep one TaskId to follow a task UI -> Worker -> UI.IWorkerClient/WorkerHubcontracts unchanged; only the concreteWorkerClientctor gained anILoggerparam, so test fakes are unaffected.Test plan
dotnet buildApp + Worker (Release): 0 errorsclaudedo-*.log+ console; run a task and confirm UI and Worker lines share the same[TaskId]Warning+ only and no console outputReview notes (non-blocking)
BuildConfig.IsDebugusesGetEntryAssembly(), which is null under the test host -> theBuildConfigTestsassertion is effectively a tautology. This is correct for production (entry assembly = the App/Worker exe) and the spec already accepted that the branch can't be flipped within one test run.InvokeForTaskAsync'sLogContextscope currently only decorates the single debug trace line; kept as a forward-looking hook for future UI log lines on that path.See
docs/superpowers/specs/2026-06-04-debug-logging-traceability-design.mdand the matching plan indocs/superpowers/plans/.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.