Replace log dict toggles with logdiff kwarg and kanta.transaction.diff logger
Per-transaction logdiff=False skips building and printing the diff body, logging only the header. Globally, configure_logging(diff=False) disables the kanta.transaction.diff child logger, which now carries all diff lines, so applications can route or silence diffs separately from headers.
This commit is contained in:
+6
-2
@@ -215,8 +215,12 @@ def resolve_user_key(value: str) -> str | None:
|
||||
- `kanta.transaction(..., extra="...")` accepts a display-only string that is
|
||||
appended after the action in the header (colored by Kanta); it is never
|
||||
persisted in the `ChangeRecord`.
|
||||
- The header and diff parts can be toggled independently per transaction:
|
||||
`kanta.transaction(..., log={"header": True, "diff": False})`.
|
||||
- `kanta.transaction(..., logdiff=False)` skips building and printing the diff
|
||||
body and logs only the header, which is useful for large or noisy
|
||||
changesets. Diff output can also be disabled globally with
|
||||
`configure_logging(diff=False)`; diff lines are emitted on the
|
||||
`kanta.transaction.diff` child logger so applications can route or silence
|
||||
them separately from the headers.
|
||||
|
||||
## Migrations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user