Skip to content

Commit

Permalink
Redefine the return value
Browse files Browse the repository at this point in the history
Clarify the true/false expectation and add optional stale value return.
  • Loading branch information
MrAlias committed May 21, 2024
1 parent b646ca2 commit aa6b297
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions specification/logs/bridge-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,9 @@ parameters to be added.

This API MUST return a language idiomatic boolean type.

The returned value MUST be `true` when logging is enabled for the provided
arguments. The returned value can be `true` or `false` when logging is disabled
for the provided arguments. The ambiguity when disabled allows implementation
that want to optimize memory or handle indeterminable states the flexibility
they need. If an implementation does not need this flexibility, it SHOULD
return `false` when logging is disabled for the provided arguments.
Implementations of this API SHALL return `true` when logging is enabled or
`false` when logging is disabled for the provided arguments. Implementations
designed for performance that cache the logging state MAY return stale values.

The returned value is not always static, it can change over time. The API
SHOULD be documented that users needs to call this API each time they generate
Expand Down

0 comments on commit aa6b297

Please sign in to comment.