From 83d0a37b6e13a5bf04da8f9459e24b3cd40eb7f4 Mon Sep 17 00:00:00 2001 From: Dmitrii Safronov Date: Mon, 26 Oct 2026 01:31:09 +0400 Subject: [PATCH] docs: explain structured logging contract motivation --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c7a5b0b..01b0044 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # python-logging-objects-with-schema +Arbitrary `extra` fields let log producers use different names, structures, and +types for the same information, making downstream searches, alerts, and +dashboards harder to maintain. A shared schema makes these structured fields a +contract between producers and consumers. `SchemaLogger` emits the valid fields +and reports data-validation violations separately, so a malformed field does +not discard the valid part of the record. + `SchemaLogger` extends Python's standard `logging.Logger` with schema-driven validation and projection of `extra` fields. It preserves the standard logging API while invalid structured data is dropped and reported separately.