Skip to content

[Harden][Logging]: suppress Franz.Common namespace in production logs - #208

Merged
bestacio89 merged 10 commits into
developfrom
hardening/production-framework-log-filter
Nov 20, 2026
Merged

bestacio89 merged 10 commits into
developfrom
hardening/production-framework-log-filter

Conversation

@bestacio89

Copy link
Copy Markdown
Owner

Summary

Exclude all log events emitted from the Franz.Common namespace from the non-development production-style UseLog() pipeline.

Changes

  • Add a production-only Serilog filter based on the structured SourceContext property.
  • Exclude the exact Franz.Common source and all descendant namespaces beginning with Franz.Common., regardless of event level.
  • Preserve application logs, similarly prefixed namespaces such as Franz.Commonish, and events without a SourceContext.
  • Leave Development, UseDesktopLog(), and UseHybridLog() behavior unchanged.
  • Add a dedicated Franz.Common.Logging.Tests project, include it in the solution and core CI suite, and document the production filtering contract.

Validation

  • Regression tests cover framework root/descendant namespace exclusion, Error-level suppression, application namespace preservation, near-prefix preservation, and missing SourceContext.
  • CI must run the core test suite and quality/solution validation.

Architecture

The filter is implemented in Franz.Common.Logging, where the production Serilog pipeline and sinks are owned. No application-specific namespaces or message-text heuristics are introduced.

@bestacio89
bestacio89 merged commit d6beffb into develop Nov 20, 2026
9 checks passed
@bestacio89
bestacio89 deleted the hardening/production-framework-log-filter branch November 20, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant