Logging, diagnostics, and traceability
Documentation status: guide — see Maturity and evidence.
Logging records execution. Diagnostics explain a failed layer. Traceability connects runtime activity back to conceptual meaning.
Trace units
Useful trace fields include concept/class identifier, object identity, action, event, process state, user or agent context, publication channel, and result. Prefer a message such as [RiskReviewProcess.Finalize] validation failed to a generic operation failed.
For event-driven execution, diagnostics should show the event, source, bound handlers, and completion status for each handler. For views, report the view name and path. For actions, report the action and missing or invalid parameter.
Business-level traceability
Events and process states provide a higher-level audit trail than low-level logs. They explain what happened in terms of the model. This is especially important when published actions are called by web services, agents, or AI assistants.
functionalP logging example
When a runtime logging capability is exposed to the script environment, keep the useful source example but publish the normalized name:
Logger.WriteLog('functionalP script executed', 1);
The exact logging surface remains subject to the target runtime contract; the example demonstrates dot-expression access rather than a guaranteed cross-runtime signature.