This page defines how libLogit should fail when configuration, levels, paths, or optional features are wrong.
The goal is not to make every binding throw the exact same exception type. The goal is to make the failure shape predictable across bindings.
Portable logging gets messy when one binding rejects a bad config clearly and another quietly accepts it. The user then thinks the SDK is portable when the real behavior is just drifting.
Beta needs a consistent answer to two questions:
libLogit should prefer:
The SDK should avoid:
These happen when the overall structure is wrong.
Examples already present in the repo:
LOGIT structure must be an objectConfiguration root must be an objectdefaults must be an objectlogits must be a non-empty objectLOGIT '<name>' must be an objectExpected policy:
These happen when the config contains keys the binding/schema does not recognize.
Examples already present in the repo:
Unsupported configuration keys: [...]Unsupported LOGIT configuration keys: [...]Unsupported redaction options: [...]Unsupported buffering options: [...]Unsupported failurePolicy options: [...]Expected policy:
These happen when the level is wrong by value or type.
Examples already present in the repo:
Unknown level: <value>level must be a string, got <type>level.threshold is required when level is an objectExpected policy:
These happen when path semantics contradict each other.
Examples already present in the repo:
outputDirectory requires pathMode 'directory'pathMode must be one of [directory, file]<name> cannot be an empty stringExpected policy:
These happen when a sink name is not part of the binding’s supported contract.
Examples already present in the repo:
Unknown sink: <name>sinks entries must be stringssinks must be a listExpected policy:
These happen when Python-reference advanced fields are malformed.
Examples already present in the repo:
redaction.patterns contains invalid regex: ...buffering.mode must be one of [...]failurePolicy.fallbackPath is required when mode is fallbackrotation.maxBytes is required when rotation.maxFiles is setdatabasePath is required when the database sink is enabledExpected policy:
For optional or advanced fields, a binding should do exactly one of these:
What a binding should not do:
These are strong enough to teach broadly today:
localPathoutputDirectorypathModeremotePathlevelformatmetadatasinksrotationretentionThese have the strongest direct validation and runtime proof in Python:
redactionbufferingfailurePolicydatabasePath plus richer retention behaviorOther bindings should currently be treated as baseline implementations unless their docs and tests say otherwise.
Across bindings, the wording does not need to be byte-for-byte identical. But good libLogit errors should usually have these qualities:
Good examples from the current repo:
Unknown level: panicoutputDirectory requires pathMode 'directory'buffering.capacity must be a positive integerfailurePolicy.fallbackPath is required when mode is fallbackNot every exact error string needs cross-binding conformance today. But the failure category should remain stable:
That is enough to make the SDK feel coherent while Beta hardens the full binding matrix.